Constructor and Description |
---|
ModelValidator(String model) |
Modifier and Type | Method and Description |
---|---|
protected ParserValidator |
createParserValidator()
Returns a registered parser validator based on the model syntax.
|
String |
validate(String parameterValue,
ModelValidatorContext context)
Check whether the specified
value is valid. |
public static final String PREFIX
public ModelValidator(String model)
public String validate(String parameterValue, ModelValidatorContext context) throws ValidationException
Validator
value
is valid. If not, a
checked exception that contains the cause is thrown.validate
in interface Validator<String>
parameterValue
- the value to check.context
- a context object, if needed by the validatorValidationException
- if the parameter value is invalid.protected ParserValidator createParserValidator() throws ModelSyntaxException
ModelSyntaxException
- if an error occurred during the parser creation