- December 2, 2020 at 5:58 pm #395668Gareth LisleParticipant
Great 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 ThanksDecember 3, 2020 at 5:42 pm #395795DineshKeymaster
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.
ThanksDecember 4, 2020 at 11:06 am #395851
Custom Regex Validation Triggers In Error When Add New Line To Post Body Field