Beispiel #1
0
 private void validate(Validator<String> validator, String valueToValidate)
     throws ValidationException {
   ValidationBean validationBean = validator.validate(valueToValidate);
   if (!validationBean.isValid()) {
     throw new ValidationException(validationBean.getError());
   }
 }
Beispiel #2
0
 public void validateEmail() throws ValidationException {
   validate(Validator.lengthValidator(255), getEmail());
   validate(Validator.EMAIL, getEmail());
 }
Beispiel #3
0
 public void validateMatcher() throws ValidationException {
   validate(Validator.lengthValidator(255), getMatcher());
 }