Common Field Attributes

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

  • type
  • name
  • schemaAttribute
  • label
  • tip
  • validation

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

type

Required: Yes

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

  • Text input
  • Email
  • Password
  • Checkbox
  • Radio buttons
  • Select menu
  • Text area
  • Date select
  • Read-only
  • Hidden
  • multiIdentifierAuth

For example:

"type": "radio"

name

Required: Yes

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

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

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} endpoint to return a list of valid identifiers. For example:

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

tip

Required: No

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} endpoint to return a list of valid identifiers. For example:

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

validation

Required: No

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} endpoint 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"
    }
  }
]