public class AbstractEmailValidator<A extends Annotation> extends Object implements ConstraintValidator<A,CharSequence>
The specification of a valid email can be found in RFC 2822 and one can come up with a regular expression matching all valid email addresses as per specification. However, as this article discusses it is not necessarily practical to implement a 100% compliant email validator. This implementation is a trade-off trying to match most email while ignoring for example emails with double quotes or comments.
|Constructor and Description|
|Modifier and Type||Method and Description|
Implements the validation logic.
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public boolean isValid(CharSequence value, ConstraintValidatorContext context)
valuemust not be altered.
This method can be accessed concurrently, thread-safety must be ensured by the implementation.
Copyright © 2021 JBoss by Red Hat. All rights reserved.