Fix Javadoc code example in ValidationErrorList
kwwall opened this issue · 0 comments
kwwall commented
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().
".