public class NumberValidationRule extends BaseValidationRule
ValidatorallowNull, encoder| Constructor and Description |
|---|
NumberValidationRule(String typeName,
Encoder encoder) |
NumberValidationRule(String typeName,
Encoder encoder,
double minValue,
double maxValue) |
| Modifier and Type | Method and Description |
|---|---|
Double |
getValid(String context,
String input)
Parse the input, throw exceptions if validation fails
|
Double |
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, whitelistpublic Double getValid(String context, String input) throws ValidationException
context - for logginginput - the value to be parsedValidationException - if any validation rules failpublic Double sanitize(String context, String input)
sanitize in class BaseValidationRuleCopyright © 2016 The Open Web Application Security Project (OWASP). All rights reserved.