Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/main/java/org/owasp/esapi/ValidationErrorList.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@
* attempts, your controller code would look something like:
*
* <PRE>
* ValidationErrorList() errorList = new ValidationErrorList();
* ValidationErrorList errorList = new ValidationErrorList();
* String name = ESAPI.validator().getValidInput("Name", form.getName(), "SomeESAPIRegExName1", 255, false, errorList);
* String address = ESAPI.validator().getValidInput("Address", form.getAddress(), "SomeESAPIRegExName2", 255, false, errorList);
* Integer weight = getValidInteger("Weight", form.getWeight(), 1, 1000000000, false, errorList);
* Integer sortOrder = getValidInteger("Sort Order", form.getSortOrder(), -100000, +100000, false, errorList);
* Integer weight = ESAPI.validator().getValidInteger("Weight", form.getWeight(), 1, 1000000000, false, errorList);
* Integer sortOrder = ESAPI.validator().getValidInteger("Sort Order", form.getSortOrder(), -100000, +100000, false, errorList);
* request.setAttribute( "ERROR_LIST", errorList );
* </PRE>
*
* The at your view layer you would be able to retrieve all
* Then at your view layer you would be able to retrieve all
* of your error messages via a helper function like:
*
* <PRE>
* public static ValidationErrorList getErrors() {
* HttpServletRequest request = ESAPI.httpUtilities().getCurrentRequest();
* ValidationErrorList errors = new ValidationErrorList();
* if (request.getAttribute(Constants.ERROR_LIST) != null) {
* if (request.getAttribute("ERROR_LIST") != null) {
* errors = (ValidationErrorList)request.getAttribute("ERROR_LIST");
* }
* return errors;
Expand Down