I have a situation in which I am asking users to enter a site name into a text field with the following rules:
- no spaces
- only lowercase letters, numbers, underscores, and dashes
I would like to validate their input and provide feedback if they don't follow the rules. I believe that the "Field Validation" module for Drupal would provide this service. Just checking to see if there is any option for this in Backdrop CMS core or contrib?
Comments
Ah, I was pretty sure I started down this path before.
Some work has been put into porting the field_validation module for Backdrop CMS. https://github.com/backdrop-contrib/field_validation
But, it's not yet stabile enough to be used or for a release.
I even opened an issue a few months back: https://github.com/backdrop-contrib/field_validation/issues
I'll try to find some time to work on this module, but would appreciate any help.
I'm a little hesitant to share this code, because I'm still testing it. But, this seems to be meeting my basic need right now (for anyone interested). I expect, I'll need to tweak the RegEx validation over time.
It would still be really nice to get the field validation module working...