Data Template Validation Fields

Data templates in Penzle allow you to define the structure and data types of content items in your website or application. To ensure that content authors are entering data correctly, you can use validation fields to specify rules for the values that can be entered into specific fields within a data template.

Validation Types

Penlze provides several types of validation fields that can be used to ensure that content authors enter data correctly and consistently. In this section, we'll discuss the different types of validation fields available in Penzle and provide examples of how to use them.

There are available validation types:

  1. RegEx Validator Field: This field allows you to define a regular expression that the field value must match. For example, you could use a RegEx validator to ensure that a phone number field only accepts numbers and hyphens.
  2. Required Field Validator: This field ensures a field must contain a value before the content item can be saved. This is useful for ensuring that important fields are filled in.
  3. Max Rule Validator: To specify a maximum value for a field. For example, to limit a numeric field to a maximum value of 100, follow these steps:
  4. Min Rule Validator: To specify a minimum value for a field. For example, to require a numeric field to have a minimum value of 1.
  5. Range Validator: To specify a range of acceptable values for the field, you can use Min and Max Rule validation. For example, you could use a Range validator to ensure that a numeric field only accepts values between 1 and 100.

Adding Validation Fields to a Data Template

Validation fields can specify rules for the values that can be entered into specific fields within a data template. You can apply multiple validation rules to a single field. 

To add a validation field to a data template, follow these steps:

  1. Go to Development > Data Templates and navigate to the data template you want to add the validation field.
  2. Select the field to which you want to add the validation and select the Validation tab.
    Validation settings.
  3. Select the type of validation field you want to add.
  4. Configure the validation fields settings, such as the regular expression pattern or minimum acceptable values.
    Validation rules.
  5. Click Save.