Add validations to existing fields

For each content type, you can add validations to existing fields.

To add validations to existing fields:

  1. Log in to the web app.

  2. Click the "Content model" tab and choose an existing content type. The list of fields for your selected content type is displayed.

  3. Click Edit on the field of interest to open the field editor. Under the "Validation" section, the available validation options for the field type are displayed.

    validation-section

    Different fields have different validation options that are specific to that field type. For example, the Short Text field allows constraints around uniqueness, being required, matching/prohibiting patterns, and length, and only allowing predefined values. Additional options become visible when a validation is selected.

IMPORTANT: Entries with any required fields left empty cannot be published, even if these fields are hidden in the field editor. To continue publishing entries with hidden fields, change the validation of these fields to optional by de-selecting the Required field option under the "Validation" section for each field. You can manually update each field, or run a script to make these changes in bulk. For more information about the script, see the Validations section on the Content Management API page.

Appearance

Fields can be set to have a specific appearance, to help guide editors while working on content. For example, if a text field must match a predefined list, it may be easier to provide the editor with a dropdown list or a radio button list with those values. 

To set the appearance of a field:

  1. Under the “Appearance” section, the different options are displayed.

  2. Select the desired appearance. You can also add help text to a field on this tab.

    the Appearance section for fields
  3. Once you are happy with the validation, click Confirm to close the field editor.

  4. Click Save on the content type editor to update the content type.

IMPORTANT: Changes will not take effect until the content type has been saved.