@Singleton public class EmailValidator extends Object
VALID
Constructor and Description |
---|
EmailValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
isValid(CharSequence value,
AnnotationValue<Email> annotationMetadata,
ConstraintValidatorContext context)
Implements the validation logic.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isValid
initialize
public boolean isValid(@Nullable CharSequence value, @NonNull AnnotationValue<Email> 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