de.schegge.phone.validation.GermanDestinationCodeValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of telephone Show documentation
Show all versions of telephone Show documentation
A Java API for national and international phone numbers
The newest version!
package de.schegge.phone.validation;
import java.util.Arrays;
public class GermanDestinationCodeValidator extends AbstractDestinationCodeValidator {
@Override
public void initialize(GermanDestinationCode constraintAnnotation) {
if (constraintAnnotation.value().length > 0) {
nationalDestinationCodes = Arrays.asList(constraintAnnotation.value());
} else {
nationalDestinationCodes = constraintAnnotation.ranges().getAreaCodes();
}
allowed = constraintAnnotation.allowed();
}
}