[DateRange]
Validation error codes
- Error code:
1521293685 - Error message:
You must enter an instance of DateTime. - Error code:
1521293686 - Error message:
You must select a date before %s. - Error code:
1521293687 - Error message:
You must select a date after %s. - Error code:
1748345955 - Error message:
This field cannot be validated due to a configuration error. Please contact the website owner.
Properties
implementationClassName
- Option path
- prototypes.<prototypeIdentifier>.validatorsDefinition.DateRange.implementationClassName
- Data type
- string
- Needed by
- Frontend
- Mandatory
- Yes
- Default value (for prototype 'standard')
DateRange: implementationClassName: TYPO3\CMS\Form\Mvc\Validation\DateRangeValidatorCopied!- Good to know
- Description
-
Classname which implements the validator.
options.format
- Option path
- prototypes.<prototypeIdentifier>.validatorsDefinition.DateRange.options.format
- Data type
- string
- Needed by
- Frontend
- Mandatory
- Yes
- Default value (for prototype 'standard')
DateRange: options: format: Y-m-dCopied!- Description
- The format of the minimum and maximum option.
options.minimum
- Option path
- prototypes.<prototypeIdentifier>.validatorsDefinition.DateRange.options.minimum
- Data type
- string
- Needed by
- Frontend
- Mandatory
- Yes
- Default value (for prototype 'standard')
- undefined
- Description
-
The minimum date. Use an absolute date in the format of
options.or a relative date expression.format New in version 14.2 Feature: #106681 - Support relative date formats in DateRange validator
Relative date expressions.
A relative date expression follows the syntax of the PHP function
strtotime. Examples are() today,tomorrow,-18 years, and+1 month. The expression is evaluated when the form is validated. Absolute and relative dates can be mixed in one validator.The validator compares dates at midnight, so the time of day is ignored. If a value cannot be parsed, the validator adds the configuration error
1748345955and logs the details.For a
Dateelement, the form editor also writes the values into the HTMLminandmaxattributes of the field. Relative expressions in these attributes are resolved to absoluteY-dates when the form is rendered.m- d Example: The date of birth must be at least 18 years agotype: Date identifier: date-of-birth label: 'Date of birth' validators: - identifier: DateRange options: minimum: '1900-01-01' maximum: '-18 years'Copied!
options.maximum
- Option path
- prototypes.<prototypeIdentifier>.validatorsDefinition.DateRange.options.maximum
- Data type
- string
- Needed by
- Frontend
- Mandatory
- Yes
- Default value (for prototype 'standard')
- undefined
- Description
-
The maximum date. Use an absolute date in the format of
options.or a relative date expression. The rules for relative date expressions are described in options.minimum.format New in version 14.2 Feature: #106681 - Support relative date formats in DateRange validator
Relative date expressions.
formEditor.iconIdentifier
- Option path
- prototypes.<prototypeIdentifier>.validatorsDefinition.DateRange.formEditor.iconIdentifier
- Data type
- string
- Needed by
- Backend (form editor)
- Mandatory
- Yes
- Default value (for prototype 'standard')
DateRange: formEditor: iconIdentifier: form-validator label: formEditor.elements.FormElement.validators.DateRange.editor.header.labelCopied!
- Description
-
An icon identifier which must be registered through the
\TYPO3\. This icon will be shown within the - "Inspector [CollectionElementHeaderEditor]" if the validator is selected.CMS\ Core\ Imaging\ Icon Registry
formEditor.label
- Option path
- prototypes.<prototypeIdentifier>.validatorsDefinition.DateRange.formEditor.label
- Data type
- string
- Needed by
- Backend (form editor)
- Mandatory
- Yes
- Default value (for prototype 'standard')
DateRange: formEditor: iconIdentifier: form-validator label: formEditor.elements.FormElement.validators.DateRange.editor.header.labelCopied!- Good to know
- Description
-
This label will be shown within the - "Inspector [CollectionElementHeaderEditor]" if the validator is selected.
formEditor.predefinedDefaults
- Option path
- prototypes.<prototypeIdentifier>.validatorsDefinition.DateRange.formEditor.predefinedDefaults
- Data type
- array
- Needed by
- Backend (form editor)
- Mandatory
- No
- Default value (for prototype 'standard')
DateRange: formEditor: predefinedDefaults: options: minimum: '' maximum: ''Copied!
- Description
-
Defines predefined defaults for validator options which are prefilled, if the validator is added to a form element.