The Directory Server provides attribute type extensions that constrain the values for the associated attribute using the DirectoryString attribute syntax.

To constrain the values for an attribute:

  • Use the DirectoryString attribute syntax.

    The following example schema definition includes two attributeType definitions for myAttr1 and myAttr2:

    • The first definition constrains the values for the attribute myAttr1 to ’foo’, ’bar’, and ’baz’.
    • The second definition constrains the minimum allowable length for myAttr2 to 1 and the maximum allowable length to 5.
    attributeTypes: ( 
      NAME ’myAttr1’ 
      X-ALLOWED-VALUES ( ’foo’ ’bar’ ’baz’ ))
    attributeTypes: ( 
      NAME ’myAttr2’ 
      X-MAX-VALUE-LENGTH ’5’ )