• Use the dsconfig tool (interactive or command line) to create and configure JSON attribute constraints. The following is a sample command:
    $ bin/dsconfig create-json-attribute-constraints \
      --attribute-type appjson \
      --set enabled:true \
      --set allow-unnamed-fields:false
    $ bin/dsconfig create-json-field-constraints \
      --attribute-type appjson \
      --json-field email.verified \
      --set value-type:boolean \
      --set is-required:true \
      --set index-values:true \
      --set tokenize-values:false \
      --set allow-null-value:true
    $ bin/dsconfig create-json-field-constraints \
      --attribute-type appjson \
      --json-field email.type \
      --set value-type:string \
      --set is-required:true \
      --set index-values:true \
      --set tokenize-values:true \
      --set allowed-value:home \
      --set allowed-value:other \
      --set allowed-value:work \
      --set allow-null-value:false \
      --set minimum-value-length:1
    $ bin/dsconfig create-json-field-constraints \
      --attribute-type appjson \
      --json-field email.value \
      --set value-type:string \
      --set is-required:true \
      --set index-values:true \
      --set tokenize-values:true \
      --set prime-index:true \
      --set allow-null-value:true \
      --set maximum-value-length:256 \
      --set minimum-value-length:1 \
      --set allowed-value-regular-expression:[-_\+\.\w\d]+@\w+\.\w{2,5}