}
static public void validateInternationalAddress(String value) throws SxmpErrorException {
// make sure address is at least 2 digits long
if (value.length() < 2) {
throw new SxmpErrorException(SxmpErrorCode.UNABLE_TO_CONVERT_VALUE, "International address must be at least 2 characters in length");
}
// first character must be +
if (value.charAt(0) != '+') {
throw new SxmpErrorException(SxmpErrorCode.UNABLE_TO_CONVERT_VALUE, "International address must start with '+' character followed by country dialing code and national number");
}
for (int i = 1; i < value.length(); i++) {
if (!Character.isDigit(value.charAt(i))) {
throw new SxmpErrorException(SxmpErrorCode.UNABLE_TO_CONVERT_VALUE, "International address contained an invalid character [" + value.charAt(i) + "]");
}
}
}