FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix remaining errors in ValidationErrorList Javadoc example by VolodymyrLinuxovich · Pull Request #922 · ESAPI/esapi-java-legacy · GitHub

Repository navigation

Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .java  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
10 changes: 5 additions & 5 deletions src/main/java/org/owasp/esapi/ValidationErrorList.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL