Common field attributes

All fields share a set of common attributes. These common field attributes include:

  • type
  • name
  • schemaAttribute
  • label
  • tip
  • validation
  • element
  • forms

These attributes are described in more detail in the following sections.


type

Required: Yes
Term used in the Configuration API: type
Term used in Registration Builder: Field Type

The kind of field that you wish to create or update. Currently supported field types are:

For example:

"type": "radio"

name

Required: Yes
Term used in the Configuration API: name
Term used in Registration Builder: Name

Unique name used to identify the field. For example:

"name": "myCoolField"

Note that field names cannot contain blank spaces. myCoolField is a valid field name; my Cool Field is not.


schemaAttribute

Required: Yes
Term used in the Configuration API: schemaAttribute
Term used in Registration Builder: Schema Attribute

Path to the entity type schema attribute the field maps to. For example, the following syntax maps a field to the primaryAddress.phone attribute:

"schemaAttribute": "primaryAddress.phone"

label

Required: No
Term used in the Configuration API: label
Term used in Registration Builder: Label

Optional field label used by the Identity Cloud JavaScript SDK (labels are not necessary for pure API implementations). Labels must be a reference to a translation identifier; you can use the /config/{app}/flows/{flow}/locales/{locale} operation to return a list of valid identifiers. For example:

"label": {
  "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
}

tip

Required: No
Term used in the Configuration API: tip
Term used in Registration Builder: Tip

Optional field tooltip that is used by the Identity Cloud JavaScript SDK (tips are not necessary for pure API implementations). Tips must be a reference to a translation identifier; you can use the /config/{app}/flows/{flow}/locales/{locale} operation to return a list of valid identifiers. For example:

"tip": {
  "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
}

validation

Required: No
Term used in the Configuration API: validation
Term used in Registration Builder: Data validations

Optional list of validations to be applied to a field. Validations have the following attributes:

  • rule (required). Name of the validation rule to apply. This must be one of the validations allowed for the field type.

  • value (required). Value to use for validation. For some validations this will either be true or false; for example, the required validation should be set to true (this field is required) or false (this field is not required). Other validations require a configuration value of some type.

  • message (required). Error message to be used if the validation fails. This must be a reference to a translation identifier; you can use the /config/{app}/flows/{flow}/locales/{locale} operation to return a list of valid identifiers. The message is not supported by the matchOptions validation, but is required for all other validations.

For example:

"validation": [
  {
    "rule": "required",
    "value": "true",
    "message": {
      "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
    }
  }
]

See the article Field validations for more information about the type of validations available to you when working with fields,


element

Term used in the Configuration API: n/a
Term used in Registration Builder: n/a

Internal Identity Cloud designation for the field type. Note that the element value appears only in the flow; you can’t view (or change) the element using either the Configuration APIs or Console’s Registration Builder. The Identity Cloud currently uses the following elements:


forms

Term used in the Configuration API: forms
Term used in Registration Builder: Forms

Specifies the forms that the field appears on; if you include this attribute the field is automatically displayed as the last field on the form. The forms attribute is optional: you can create a field without adding it to any forms, then later use the Configuration APIs or Registration Builder to modify the form and add the field. Going this route enables you to position the field anywhere on the form, not just at the very bottom.