Enum TelephoneNumberValidationPolicy

java.lang.Object
java.lang.Enum<TelephoneNumberValidationPolicy>
com.unboundid.ldap.matchingrules.TelephoneNumberValidationPolicy
All Implemented Interfaces:
Serializable, Comparable<TelephoneNumberValidationPolicy>, java.lang.constant.Constable

This enum defines the policy that the TelephoneNumberMatchingRule should use when validating values in accordance with the syntax. Regardless of the validation policy, the normalized representation of a value will be the provided value, converted to lowercase, with only spaces and hyphens removed.
  • Enum Constant Details

    • ALLOW_NON_EMPTY_PRINTABLE_STRING

      A policy that indicates that any non-empty printable string will be accepted. Neither empty strings nor strings that contain characters from outside the set of printable characters will be accepted.
    • ALLOW_NON_EMPTY_PRINTABLE_STRING_WITH_AT_LEAST_ONE_DIGIT

      A policy that indicates that any non-empty printable string will be accepted, as long as it contains at least one digit. Neither empty strings, strings nor strings that contain characters from outside the set of printable characters, nor strings without any digits will be accepted.
    • ENFORCE_STRICT_X520_COMPLIANCE

      A policy that indicates that only values that strictly adhere to the X.520 specification will be accepted. Only values that start with a plus sign, contain at least one digit, and contain only digits, spaces, and hyphens will be accepted.
  • Method Details

    • values

      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • validateValue

      public void validateValue(@NotNull ASN1OctetString value, boolean isSubstring) throws LDAPException
      Validates the provided value to ensure that it satisfies this validation policy.
      Parameters:
      value - The value to be validated. It must not be null.
      isSubstring - Indicates whether the provided value represents a substring rather than a complete value.
      Throws:
      LDAPException - If the provided value is not acceptable as per the constraints of this policy.