Skip to content

Fix Javadoc code example in ValidationErrorList #788

Open
@kwwall

Description

@kwwall

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().".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions