Interface FieldValidationsDescriptor

The configuration that describes the validation rules that should be applied to a certain form element.

Hierarchy

  • FieldValidationsDescriptor

Index

Properties

Optional hif

hif: string

A form element can be hidden automatically based on the value of another form element. This the ID of the other (referenced) form element. When the value of this property is empty, the form element is not hidden automatically.

Similar to hnotif, but this attribute is set when the form element is initially visible.

Optional hif_c

hif_c: string

A form element can be hidden automatically based on the value of another form element. This is the condition applied to the value of the other form element. Available condition types are:

  • 0 (has a value): The form field is hidden when the other field is non-empty.
  • 1 (equals): The form field is hidden when the value of the other field equals the hif_v.
  • 2 (does not equal): The form field is hidden when value of the the other field does not equal the hif_v.
  • 3 (matches regular expression): The form field is hidden when the other field matches the regular expression contained in hif_v.
  • 4 (is lower than): The form field is hidden when the other field's value is lower than the hif_v.
  • 5 (is greater than): The form field is hidden when the other field's value is greater than the hif_v.
  • 6 (lies between): The form field is hidden when the other field's value lies in the range as specified by hif_v. The hif_v must be a range in the format x-y, e.g. 2-37.
  • 7 (is lower than or equal to): The form field is hidden when the other field's value is lower than or equal to the hif_v.
  • 8 (is greater than or equal to): The form field is hidden when the other field's value is greater than or equal to the hif_v.
  • 9 (has no value): The form field is hidden when the other field does not have a value.

Optional hif_cl

hif_cl: string

A form element can be hidden automatically based on the value of another form element. This is a flag that indicates whether the form element is cleared when it is hidden. Can be set to one of the following options:

  • 0 (keep): The value of the form element is not changed when it is hidden.
  • 1 (clear): The value of the form element is cleared when it is hidden. For text input fields, the value is set to the empty string; for select fields, all selected options are deselected.
  • 2 (reset): The value of the form element is reset to its initial value when it is hidden.

Optional hif_v

hif_v: string

A form element can be hidden automatically based on the value of another form element. This is the value against which the other form element is compared. Whether this property is required and what it must contain depends on the selected condition, see hif_c for further details.

Optional hnotif

hnotif: string

A form element can be hidden automatically based on the value of another form element. This the ID of the other (referenced) form element. When the value of this property is empty, the form element is not hidden automatically.

Similar to hif, but this attribute is set when the form element is initially hidden.

Optional roif

roif: string

A form element can be disabled automatically based on the value of another form element. When a form field is disabled, its value cannot be changed anymore. This the ID of the other (referenced) form element. When the value of this property is empty, the form element is not disabled field automatically.

Similar to roif, but this attribute is set when the form element is initially editable.

Optional roif_c

roif_c: string

A form element can be disabled automatically based on the value of another form element. When a form field is disabled, its value cannot be changed anymore. This is the condition applied to the value of the other form element. Available condition types are:

  • 0 (has a value): The form field is read-only when the other field is non-empty.
  • 1 (equals): The form field is read-only when the value of the other field equals the roif_v.
  • 2 (does not equal): The form field is read-only when value of the the other field does not equal the roif_v.
  • 3 (matches regular expression): The form field is read-only when the other field matches the regular expression contained in roif_v.
  • 4 (is lower than): The form field is read-only when the other field's value is lower than the roif_v.
  • 5 (is greater than): The form field is read-only when the other field's value is greater than the roif_v.
  • 6 (lies between): The form field is read-only when the other field's value lies in the range as specified by roif_v. The roif_v must be a range in the format x-y, e.g. 2-37.
  • 7 (is lower than or equal to): The form field is read-only when the other field's value is lower than or equal to the roif_v.
  • 8 (is greater than or equal to): The form field is read-only when the other field's value is greater than or equal to the roif_v.
  • 9 (has no value): The form field is read-only when the other field does not have a value.

Optional roif_cl

roif_cl: string

A form element can be disabled automatically based on the value of another form element. When a form field is disabled, its value cannot be changed anymore. This is a flag that indicates whether the form element is cleared when it is disabled. Can be set to one of the following options:

  • 0 (keep): The value of the form element is not changed when it is disabled.
  • 1 (clear): The value of the form element is cleared when it is disabled. For text input fields, the value is set to the empty string; for select fields, all selected options are deselected.
  • 2 (reset) The value of the form element is reset to its initial value when it is disabled.

Optional roif_v

roif_v: string

A form element can be disabled automatically based on the value of another form element. When a form field is disabled, its value cannot be changed anymore. This is the value against which the other form element is compared. Whether this property is required and what it must contain depends on the selected condition, see roif_c for further details.

Optional rom

rom: string

A form element can be disabled automatically based on the value of another form element. When a form field is disabled, its value cannot be changed anymore. When this property is set to 1, the current value of the disabled text input field is discarded and not submitted to the server. This corresponds to the HTML disabled attribute. Otherwise, when set to 2, the value is submitted to the server. This corresponds to the HTML attribute readonly.

Please note that this property is not available for other form elements as the readonly HTML attribute is supported only by INPUT elements.

Optional ronotif

ronotif: string

A form element can be disabled automatically based on the value of another form element. When a form field is disabled, its value cannot be changed anymore. This the ID of the other (referenced) form element. When the value of this property is empty, the form element is not disabled field automatically.

Similar to roif, but this attribute is set when the form element is initially read-only.

Optional vcmn

vcmn: string

The minimum number of checkboxes or radio buttons that must be checked or selected. When empty, no restriction is applied.

see

vcmx

Optional vcmx

vcmx: string

The maximum number of checkboxes or radio buttons that must be checked or selected. When empty, no restriction is applied.

see

vcmn

Optional vdt

vdt: string

The data type is used during form validating to ensure the entered data conforms to a certain format. The following built-in data types are currently available:

  • dateDE: Allows only German-style dates (DD.MM.YYYY), e.g. 22.05.1990.
  • email: Allows only valid (international) email addresses, e.g. james@john.org or θσερ@εχαμπλε.ψομ.
  • integer: Allows only integers, that is numbers without a decimal point, e.g. 3, 0, or -21.
  • ipv4: Allows only IP4 addresses, e.g. 127.0.0.1 or 10.42.42.13.
  • money: Requires the input to be a valid amount of money, i.e. a number with exactly two decimal digits, e.g. 2,00, -3,95, 0,00 or 897345,38.
  • number: Allows only numbers, including numbers with a decimal point, e.g. 0.03, -99.2, or 42.
  • onlyLetterNumber: Allows only letters, numbers, and spaces.
  • onlyLetterSp: Allows only letters and spaces.
  • phone: Allows only valid phone numbers, e.g. 0234995483 or +49 351 4459654.
  • plzDE: Allows only postal code from Germany, i.e. exactly 5 digits, e.g. 02349. Does not check whether such a code is actually registered within Germany.
  • posinteger: Allows only positive integers, e.g. 0, 3, oder 123.
  • posmoney : Requires the input to be a valid amount of money, not including negative numbers, e.g. 0,00 or 2,34.
  • posmoneyOptionalComma: Requires the input to be a valid positive amount of money, with the decimal digits being optional, e.g. 0,00, 0, 3,4, or 3.
  • regexp: Allows the user who creates the form to enter a custom (JavaScript flavor) regular expression for validation.
  • text: Applies no restriction and allows every input.
  • time: Requires the input to be a valid time, in the format hh:mm, e.g. 22:05 or 03:42.
  • url: Allows only URLs, including the protocol, e.g. http://example.com or https://www.james.org.

Optional veq

veq: string

When not empty, this property refers to the ID of another form field that must have the same value as the form field. The form field is invalid if the value of the form field is different compared to the value of the referenced form field.

Optional vfex

vfex: string

A comma separated list of file extensions (without the leading period) an uploaded file must have, such as xml,js. An upload field is invalid if a file with a different file extension is selected. When empty, all extensions are allowed.

Optional vfmx

vfmx: string

The maximum file size in kilobytes a single uploaded file is allowed to have. When set to 0, the file size is unlimited.

Optional vgr

vgr: string

The required group to which the form field belongs. If a form element is part of a required group, the form is invalid when no element of the required group has a value. The form becomes valid once the user has filled in at least one form field of the required groups.

Optional vmn

vmn: string

The minimum numerical value (inclusive) that must be entered. Contrast this with vmnl, which checks the number of characters, not the numerical value these characters represent. When empty, no restriction is applied.

Optional vmnl

vmnl: string

The minimum number of characters that must be entered in a text field or text area. Please note that this restriction is applied only when the form field is not empty. Thus, when set to 0, the form field is never invalid due to this property. To enforce that the user does not leave the form field empty, use vr.

Optional vmx

vmx: string

The maximum numerical value (inclusive) that must be entered. Contrast this with vmxl, which checks the number of characters, not the numerical value these characters represent. When empty, no restriction is applied.

see

vmn

Optional vmxl

vmxl: string

The maximum length of the input that is allowed. If set to 0, the length is unlimited. For input fields and text area, the length of the entered text is checked. For upload fields, the length of the file name is checked.

Optional vr

vr: string

If set to 0, the form element is not required and can be left empty. Otherwise, if set to 1, the form element is required and a value must be entered.

Optional vrif

vrif: string

A form element can be made a required field automatically based on the value of another form element. This the ID of the other (referenced) form element. When the value of this property is empty, the form element is not made a required field automatically.

Similar to vrnotif, but this attribute is set when the form element is initially optional.

Optional vrif_c

vrif_c: string

A form element can be made a required field automatically based on the value of another form element. This is the condition applied to the value of the other form element. Available condition types are:

  • 0 (has a value): The form field is a required field when the other field is non-empty.
  • 1 (equals): The form field is a required field when the value of the other field equals the vrif_v.
  • 2 (does not equal): The form field is a required field when value of the the other field does not equal the vrif_v.
  • 3 (matches regular expression): The form field is a required field when the other field matches the regular expression contained in vrif_v.
  • 4 (is lower than): The form field is a required field when the other field's value is lower than the vrif_v.
  • 5 (is greater than): The form field is a required field when the other field's value is greater than the vrif_v.
  • 6 (lies between): The form field is a required field when the other field's value lies in the range as specified by vrif_v. The vrif_v must be a range in the format x-y, e.g. 2-37.
  • 7 (is lower than or equal to): The form field is a required field when the other field's value is lower than or equal to the vrif_v.
  • 8 (is greater than or equal to): The form field is a required field when the other field's value is greater than or equal to the vrif_v.
  • 9 (has no value): The form field is a required field when the other field does not have a value.

Optional vrif_v

vrif_v: string

A form element can be made a required field automatically based on the value of another form element. This is the value against which the other form element is compared. Whether this property is required and what it must contain depends on the selected condition, see vrif_c for further details.

Optional vrmm

vrmm: string

This is the message that is displayed to the user when the value of a form field does not matched the vrule regular expression. If not set, a generic error message is displayed.

Optional vrnotif

vrnotif: string

A form element can be made a required field automatically based on the value of another form element. This the ID of the other (referenced) form element. When the value of this property is empty, the form element is not made a required field automatically.

Similar to vrif, but this attribute is set when the form element is initially required.

Optional vrule

vrule: string

This is the regular expression that is used to validate the form field. This must be a valid JavaScript regular expression. Usually it is recommend to use the anchors ^...$ to ensure the whole input conforms to the pattern.