public class StringValidator extends AbstractFormularComponentValidator<FormularComponent>
Constructor and Description |
---|
StringValidator(boolean required) |
StringValidator(boolean required,
String message,
String title) |
Modifier and Type | Method and Description |
---|---|
boolean |
isRequired() |
void |
setRequired(boolean required) |
void |
validate(FormularComponent component)
Validates a component's state.
|
protected void |
validate(FormularComponent component,
String value) |
getMessage, getTitle, setMessage, setTitle, throwValidationException
public boolean isRequired()
public void setRequired(boolean required)
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 validprotected void validate(FormularComponent component, String value) throws ValidationException
ValidationException
Copyright © 2003–2021 XDEV Software. All rights reserved.