You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
505 B
21 lines
505 B
package com.rotanareg.skolan.userManager;
|
|
|
|
import javax.validation.ConstraintValidator;
|
|
import javax.validation.ConstraintValidatorContext;
|
|
|
|
public class EmailAddressValidator implements ConstraintValidator<ValidEmailAddress, String> {
|
|
|
|
@Override
|
|
public void initialize(ValidEmailAddress constraintAnnotation) {
|
|
}
|
|
|
|
@Override
|
|
public boolean isValid(String value, ConstraintValidatorContext context) {
|
|
return value == null || value.equals("") || value.contains("@");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|