@Singleton
public class PatternValidator
extends java.lang.Object
Pattern
annotation.VALID
Constructor and Description |
---|
PatternValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
isValid(java.lang.CharSequence value,
AnnotationValue<javax.validation.constraints.Pattern> annotationMetadata,
ConstraintValidatorContext context)
Implements the validation logic.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isValid
public boolean isValid(@Nullable java.lang.CharSequence value, @NonNull AnnotationValue<javax.validation.constraints.Pattern> annotationMetadata, @NonNull ConstraintValidatorContext context)
ConstraintValidator
Implementations should be thread-safe and immutable.
value
- object to validateannotationMetadata
- The annotation metadatacontext
- The context objectfalse
if value
does not pass the constraint