Home › Forums › Jquery Validation For Gravity Forms › Custom Regex Validation Triggers In Error When Add New Line To Post Body Field
- This topic has 2 replies, 2 voices, and was last updated 1 month, 3 weeks ago by
Gareth Lisle.
- AuthorPosts
Gareth Lisle
ParticipantGreat plugin – however I’ve already hit an issue.
When adding a custom Regex Validation and applying it to a Gravity Form Post Field – Body. The validation triggers in error if you add multiple lines of text. I.E if hit the return key to add a new line.
As an example if you create a Regex Validation using the following simple code:
/^((?!badword).)*$/i ( this should throw a warning if you type “badword” – it works but a false positive if you add line breaks).
Then add the class to the Post Body field in your Gravity Form.
Then test front-end – add some random text, hit return and add some more – the validation triggers even if you don’t type “badword”.What can I do to resolve this validation error on multiline form fields?
Many Thanks
Dinesh
KeymasterHi Gareth,
We are really sorry but our Custom Regex doesn’t support multi line as of now.
I will try and see if we can add multi line regEx support.
Thanks
Gareth Lisle
ParticipantMany thanks for your update
- This reply was modified 1 month, 3 weeks ago by
Gareth Lisle.
- This reply was modified 1 month, 3 weeks ago by
- AuthorPosts