BAEL-112 - custom validator - format fixes
This commit is contained in:
parent
f8bd663f7d
commit
42f1ef0bf3
@ -16,7 +16,9 @@ import javax.validation.Payload;
|
||||
public @interface ContactNumberConstraint {
|
||||
|
||||
String message() default "Invalid phone number";
|
||||
|
||||
Class<?>[] groups() default {};
|
||||
|
||||
Class<? extends Payload>[] payload() default {};
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,8 @@ import javax.validation.ConstraintValidatorContext;
|
||||
public class ContactNumberValidator implements ConstraintValidator<ContactNumberConstraint, String> {
|
||||
|
||||
@Override
|
||||
public void initialize(ContactNumberConstraint contactNumber) {}
|
||||
public void initialize(ContactNumberConstraint contactNumber) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(String contactField, ConstraintValidatorContext cxt) {
|
||||
|
@ -15,4 +15,8 @@ public class ValidatedPhone {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return phone;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user