Class EmailValidator
java.lang.Object
io.micronaut.validation.validator.constraints.EmailValidator
- All Implemented Interfaces:
ConstraintValidator<jakarta.validation.constraints.Email,
,CharSequence> jakarta.validation.ConstraintValidator<jakarta.validation.constraints.Email,
CharSequence>
Provides Email validation. Largely based off the Hibernate validator implementation.
- Author:
- Emmanuel Bernard, Hardy Ferentschik, Guillaume Smet, graemerocher
-
Field Summary
Fields inherited from interface io.micronaut.validation.validator.constraints.ConstraintValidator
VALID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isValid
(@Nullable CharSequence value, @NonNull io.micronaut.core.annotation.AnnotationValue<jakarta.validation.constraints.Email> annotationMetadata, @NonNull ConstraintValidatorContext context) Implements the validation logic.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.validation.validator.constraints.ConstraintValidator
isValid
Methods inherited from interface jakarta.validation.ConstraintValidator
initialize
-
Constructor Details
-
EmailValidator
public EmailValidator()
-
-
Method Details
-
isValid
public boolean isValid(@Nullable @Nullable CharSequence value, @NonNull @NonNull io.micronaut.core.annotation.AnnotationValue<jakarta.validation.constraints.Email> annotationMetadata, @NonNull @NonNull ConstraintValidatorContext context) Description copied from interface:ConstraintValidator
Implements the validation logic.Implementations should be thread-safe and immutable.
- Parameters:
value
- object to validateannotationMetadata
- The annotation metadatacontext
- The context object- Returns:
false
ifvalue
does not pass the constraint
-