isValid
public boolean isValid(Contains annotation,
String argument)
For each value or parameter which should be checked this method will be invoked.
If the method returns true the value is valid. If it returns false the value
is considered invalid. When all constraints have been checked a ConstraintViolationException
will be thrown with all the constraint violations that were found.
- Specified by:
isValid
in interface Constraint<Contains,String>
- Parameters:
annotation
- the annotation to match
argument
- the value to be checked
- Returns:
- true if valid, false if invalid