Skip to content

Commit 911a170

Browse files
Fix remaining errors in ValidationErrorList Javadoc example, #788
1 parent 1556282 commit 911a170

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎src/main/java/org/owasp/esapi/ValidationErrorList.java‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@
3131
* attempts, your controller code would look something like:
3232
*
3333
* <PRE>
34-
* ValidationErrorList() errorList = new ValidationErrorList();
34+
* ValidationErrorList errorList = new ValidationErrorList();
3535
* String name = ESAPI.validator().getValidInput("Name", form.getName(), "SomeESAPIRegExName1", 255, false, errorList);
3636
* String address = ESAPI.validator().getValidInput("Address", form.getAddress(), "SomeESAPIRegExName2", 255, false, errorList);
37-
* Integer weight = getValidInteger("Weight", form.getWeight(), 1, 1000000000, false, errorList);
38-
* Integer sortOrder = getValidInteger("Sort Order", form.getSortOrder(), -100000, +100000, false, errorList);
37+
* Integer weight = ESAPI.validator().getValidInteger("Weight", form.getWeight(), 1, 1000000000, false, errorList);
38+
* Integer sortOrder = ESAPI.validator().getValidInteger("Sort Order", form.getSortOrder(), -100000, +100000, false, errorList);
3939
* request.setAttribute( "ERROR_LIST", errorList );
4040
* </PRE>
4141
*
42-
* The at your view layer you would be able to retrieve all
42+
* Then at your view layer you would be able to retrieve all
4343
* of your error messages via a helper function like:
4444
*
4545
* <PRE>
4646
* public static ValidationErrorList getErrors() {
4747
* HttpServletRequest request = ESAPI.httpUtilities().getCurrentRequest();
4848
* ValidationErrorList errors = new ValidationErrorList();
49-
* if (request.getAttribute(Constants.ERROR_LIST) != null) {
49+
* if (request.getAttribute("ERROR_LIST") != null) {
5050
* errors = (ValidationErrorList)request.getAttribute("ERROR_LIST");
5151
* }
5252
* return errors;

0 commit comments

Comments
 (0)