Replies: 1 comment 3 replies
-
What exactly is your suggestion? Not sure I’m following. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It is often I have to write a custom module to add some validation for some fields to help content editors or users registering make sure they follow the best practices for the site.
A common example is to validate an assets field to only allow one or multiple file extensions (this is more specific than the selection available in the field settings, e.g. a image format maybe selected, but only a jpg extension should be allowed) or test for a maximum file size (the site upload limit maybe higher than a field requires, it would be good to create a limit is this case).
Another example would be username validation where certain rules could be created such as;
The same thing for passwords where they need to have a minimum length, contain certain characters via a pattern, not contain certain words, etc.
It would show any error messages in the CP as well as the frontend.
I understand it is somewhat easy to create rules and validators in a module, but I wonder how easy it could be to have these as options to add to a field setting and manage via the CP. It may be that basic validation could be set to help cover most scenarios, and extended via a module.
I am also interested to see what others think.
Beta Was this translation helpful? Give feedback.
All reactions