@Validator public class NumberValidationOperation extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ERROR_GROUP |
protected static org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
NumberValidationOperation() |
| Modifier and Type | Method and Description |
|---|---|
protected ValidationContext |
createContext(ValidationOptions options,
ValidationExtension config) |
void |
isNumber(String value,
String locale,
String pattern,
String minValue,
String maxValue,
NumberType numberType,
ValidationOptions options,
ValidationExtension config)
Receives a numeric
value as a String and validates that it can be parsed per the rules of a
numberType |
protected void |
logSuccessfulValidation(Validator validator) |
protected Locale |
parseLocale(String locale) |
protected void |
validateWith(Validator validator,
ValidationContext validationContext) |
protected static final String ERROR_GROUP
protected static final org.slf4j.Logger LOGGER
@Throws(value=NumberErrorType.class) public void isNumber(String value, @Optional String locale, @Optional String pattern, @Optional String minValue, @Optional String maxValue, NumberType numberType, @ParameterGroup(name="Error options") ValidationOptions options, @Config ValidationExtension config) throws Exception
value as a String and validates that it can be parsed per the rules of a
numberTypevalue - the value to be testedlocale - The locale to use for the format. If not provided it defaults to the system Localepattern - The pattern used to format the valueminValue - If provided, check that the parsed value is greater or equal than this valuemaxValue - If provided, check that the parsed value is less or equal than this valuenumberType - the type of number to test value againstoptions - the ValidationOptionsExceptionprotected void validateWith(Validator validator, ValidationContext validationContext) throws Exception
Exceptionprotected ValidationContext createContext(ValidationOptions options, ValidationExtension config)
protected void logSuccessfulValidation(Validator validator)
Copyright © 2020 MuleSoft, Inc.. All rights reserved.