Details
-
Bug
-
Resolution: Fixed
-
Neutral
-
6.2
-
None
-
Empty show more show less
-
Yes
-
Yes
-
UI Maintenance 4
-
2
Description
When migrating from 5.7 to 6.2.3 it has been reported that field validation is being triggered for fields which are empty but not required.
For example, if I had this configuration is Magnolia 5.7:
validators: - name: rellink class: info.magnolia.ui.form.validator.definition.RegexpValidatorDefinition pattern: ^\/.*
In 6.2 I need to update the pattern to:
validators: - name: rellink class: info.magnolia.ui.form.validator.definition.RegexpValidatorDefinition pattern: ^(|\/.*)$
Dev note:
validators precede "required: false" property now, this means that conversion of validators should be updated here: info.magnolia.ui.form.field.definition.migration.AbstractConfiguredFieldDefinitionConverter#convertValidators
(also emailValidator should be revisited to have possibility to have unrequired email field in M6 ui)
Checklists
Attachments
Issue Links
- duplicates
-
MGNLUI-6547 EmailFieldValidatorFactory does not allow empty fields
-
- Closed
-
- is causing
-
MGNLUI-7019 Validators don't validate the value which will be stored (empty string vs null)
-
- Closed
-
- to be documented by
-
MGNLUI-6999 DOC: Field validation for empty values
-
- Closed
-