Replies: 3 comments 1 reply
-
Do you mean on the front end? |
Beta Was this translation helpful? Give feedback.
1 reply
-
You could hook into the FormSubmitting event and add some validation logic there? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Check out this PR: #4949 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
Not sure if I'm just completely missing this in the docs or if its a missing feature, but is it possible to use custom validation rules within forms in Statamic?
I know theres the regex rule but thats surprisingly limited in what it can handle, with many advanced regexes just being ignored.
An example of where this has tripped me up recently would be validating a UK phone number, which is 11 digits, and can have multiple spaces. Its a contact form so you absolutely need to be able to accept a users input having spaces as they're commonly entered that way, but not everyone does it.
Failing this, it would be great if an additional event was registered prior to validation as the
FormSubmitted
event appears to run afterwards.Beta Was this translation helpful? Give feedback.
All reactions