public class NumberValidationOperation extends Object
Constructor and Description |
---|
NumberValidationOperation() |
Modifier and Type | Method and Description |
---|---|
protected ValidationContext |
createContext(ValidationOptions options,
MuleEvent muleEvent,
ValidationExtension config) |
void |
isNumber(String value,
String locale,
String pattern,
String minValue,
String maxValue,
NumberType numberType,
ValidationOptions options,
MuleEvent event,
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,
MuleEvent event) |
protected Locale |
parseLocale(String locale) |
protected void |
validateWith(Validator validator,
ValidationContext validationContext,
MuleEvent event) |
protected final Logger logger
@Operation public void isNumber(String value, @Optional String locale, @Optional String pattern, @Optional String minValue, @Optional String maxValue, NumberType numberType, @ParameterGroup ValidationOptions options, MuleEvent event, @UseConfig ValidationExtension config) throws Exception
value
as a String
and validates that it can be parsed
per the rules of a numberType
value
- the value to be testedlocale
- The locale to use for the format. If not provided it defaults to the system Locale
pattern
- 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 ValidationOptions
event
- the current MuleEvent
Exception
protected void validateWith(Validator validator, ValidationContext validationContext, MuleEvent event) throws Exception
Exception
protected ValidationContext createContext(ValidationOptions options, MuleEvent muleEvent, ValidationExtension config)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.