public class NumberRangeValidator extends AbstractFormularComponentValidator<FormularComponent>
Constructor and Description |
---|
NumberRangeValidator(boolean required,
Number min,
Number max) |
NumberRangeValidator(boolean required,
Number min,
Number max,
String message,
String title) |
Modifier and Type | Method and Description |
---|---|
Number |
getMax() |
Number |
getMin() |
boolean |
isRequired() |
void |
setMax(Number max) |
void |
setMin(Number min) |
void |
setRequired(boolean required) |
void |
validate(FormularComponent component)
Validates a component's state.
|
getMessage, getTitle, setMessage, setTitle, throwValidationException
public boolean isRequired()
public void setRequired(boolean required)
public Number getMin()
public void setMin(Number min)
public Number getMax()
public void setMax(Number max)
public void validate(FormularComponent component) throws ValidationException
Validator
If the component is not valid a ValidationException
is thrown,
otherwise the method returns normally.
component
- the component to be validatedValidationException
- if the component's state is not validCopyright © 2003–2022 XDEV Software. All rights reserved.