-
Improvement
-
Resolution: Fixed
-
Major
-
1.1.4
-
None
-
None
I've created a new module (magnolia-module-enterprise-validation) in which I've implemented a new validator. (This validator is to be shipped separately from the Form module.)
At the moment, there is no straightforward way to show a custom error message upon failed validation for this validator - the default "invalid input" is not appropriate for this validator. I.e., it is not possible for the validator to show a custom error message in this setup:
- Add the validator to config:/modules/form/config/validators as 'enterpriseEmail' (using a bootstrap file)
- Use the validator for a form field by selecting it there.
Showing a custom error message would require unneccessarily invasive changes to the form as a whole.
A workaround is to show the default error message, but add a prominent hint next to the validated field like: "Addresses from free email providers will not be accepted."
- is related to
-
MGNLFORM-50 i18n-problem with custom validation-error-messages
- Closed