public class HTMLValidationRule extends StringValidationRule
ValidatorblacklistPatterns, maxLength, minLength, validateInputAndCanonical, whitelistPatternsallowNull, encoder| Constructor and Description |
|---|
HTMLValidationRule(String typeName) |
HTMLValidationRule(String typeName,
Encoder encoder) |
HTMLValidationRule(String typeName,
Encoder encoder,
String whitelistPattern) |
| Modifier and Type | Method and Description |
|---|---|
String |
getValid(String context,
String input)
Parse the input, throw exceptions if validation fails
|
String |
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).
|
addBlacklistPattern, addBlacklistPattern, addWhitelistPattern, addWhitelistPattern, setMaximumLength, setMinimumLength, setValidateInputAndCanonicalassertValid, charArrayToSet, getEncoder, getSafe, getTypeName, getValid, isAllowNull, isValid, setAllowNull, setEncoder, setTypeName, whitelist, whitelistpublic HTMLValidationRule(String typeName)
public String getValid(String context, String input) throws ValidationException
getValid in interface ValidationRulegetValid in class StringValidationRulecontext - for logginginput - the value to be parsedValidationException - if any validation rules failpublic String sanitize(String context, String input)
sanitize in class StringValidationRuleCopyright © 2016 The Open Web Application Security Project (OWASP). All rights reserved.