GentleForm
GentleForm copied to clipboard
FEATURE REQUEST: please add a wildcard/catchall to data-errors-when
I just need to display a single error message when there is any error without creating all the possibile DIVs with the exact error class. Is that possibile?
Thanks for the suggestion! 👍
Could you expand a bit on your use case? I cannot think of a situation where not being specific about an error would improve the user experience. I know properly handling form errors can become tedious but I'd like GentleForm to encourage developers to provide a better user experience.
You can also use the includes to declare the error messages once and reuse them as much as needed (see reusing messages).
Il 11/12/2017 16:25, Gabin Aureche ha scritto:
Thanks for the suggestion! 👍
Could you expand a bit on your use case? I cannot think of a situation where not being specific about an error would improve the user experience. I know properly handling form errors can become tedious but I'd like GentleForm to encourage developers to provide a better user experience.
The use case is when you use a single full error message like this: "The password is mandatory and must be at least 8 chars with 1 uppercase and 1 number". So this cover any case. Also in multilingual application, having multiple error message with different text for the same field is a pain :-)