FieldΒΆ

Field config and error checks.

Example Code:

validators {
  DefaultValidator {
    model = DefaultValidator
    config {
      fields {
        participants {
          errorChecks {
            itemsMax {
              model = ItemsMax
              itemsMax = 5
            }
            itemsMin {
              model = ItemsMin
              itemsMin = 1
            }
          }
          fieldArray = True
          fields {
            firstName.errorChecks {
              required {
                model = Required
              }
            }
            lastName.errorChecks {
              required {
                model = Required
              }
            }
          }
        }
      }
    }
  }
}

Properties

errorChecks

List containing the error checks for this field.

Mandatory

False

Data Type

Array<String, Field>

Default

Empty Array

fieldArray

Set true if this field is an array of sub fields.

Mandatory

False

Data Type

Boolean

Default

False

fields

List containing the fields and error checks for subfields.

Mandatory

Only if fieldArray is True.

Data Type

Array<String, Field>

Default

Empty Array