org.owasp.esapi.reference.validation
public class IntegerValidationRule extends BaseValidationRule
ValidatorallowNull, encoder| Constructor and Description |
|---|
IntegerValidationRule(java.lang.String typeName,
Encoder encoder) |
IntegerValidationRule(java.lang.String typeName,
Encoder encoder,
int minValue,
int maxValue) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Integer |
getValid(java.lang.String context,
java.lang.String input)
Parse the input, throw exceptions if validation fails
|
java.lang.Integer |
sanitize(java.lang.String context,
java.lang.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, whitelistpublic IntegerValidationRule(java.lang.String typeName,
Encoder encoder)
public IntegerValidationRule(java.lang.String typeName,
Encoder encoder,
int minValue,
int maxValue)
public java.lang.Integer getValid(java.lang.String context,
java.lang.String input)
throws ValidationException
ValidationRulecontext - for logginginput - the value to be parsedValidationException - if any validation rules failpublic java.lang.Integer sanitize(java.lang.String context,
java.lang.String input)
BaseValidationRulesanitize in class BaseValidationRuleCopyright © 2014 The Open Web Application Security Project (OWASP). All Rights Reserved.