public class IntegerValidationRule extends BaseValidationRule
Validator
allowNull, encoder
Constructor and Description |
---|
IntegerValidationRule(String typeName,
Encoder encoder) |
IntegerValidationRule(String typeName,
Encoder encoder,
int minValue,
int maxValue) |
Modifier and Type | Method and Description |
---|---|
Integer |
getValid(String context,
String input)
Parse the input, throw exceptions if validation fails
|
Integer |
sanitize(String context,
String input)
The method is similar to ValidationRuile.getSafe except that it returns a
harmless object that may or may not have any similarity to the original
input (in some cases you may not care).
|
assertValid, charArrayToSet, getEncoder, getSafe, getTypeName, getValid, isAllowNull, isValid, setAllowNull, setEncoder, setTypeName, whitelist, whitelist
public Integer getValid(String context, String input) throws ValidationException
ValidationRule
context
- for logginginput
- the value to be parsedValidationException
- if any validation rules fail, except if the
ESAPI.properties
> property
"Validator.ValidationRule.getValid.ignore509Fix" is set to
true
, which is the default behavior for ESAPI 2.x
releases. See ESAPI GitHub Issues
521
for futher details.ValidationRule.getValid(String context, String input, ValidationErrorList errorList)
public Integer sanitize(String context, String input)
BaseValidationRule
sanitize
in class BaseValidationRule
Copyright © 2022 The Open Web Application Security Project (OWASP). All rights reserved.