esapi-java-legacy icon indicating copy to clipboard operation
esapi-java-legacy copied to clipboard

Fix Javadoc code example in ValidationErrorList

Open kwwall opened this issue 1 year ago • 0 comments

The code example in the class Javadoc section for org.owasp.esapi.ValidationErrorList is incorrect.

It currently looks like:

 ValidationErrorList() errorList = new ValidationErrorList();.
 String name  = getValidInput("Name", form.getName(), "SomeESAPIRegExName1", 255, false, errorList);
 String address = 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);
 request.setAttribute( "ERROR_LIST", errorList );

But there's an extraneous period at the end of the first line, just after the semicolon, and the the 2 references to getValidInput method calls should be probably preceded by "ESAPI.validator().".

kwwall avatar Jun 17 '23 17:06 kwwall