Custom Regex Validation Triggers In Error When Add New Line To Post Body Field

Home Forums Jquery Validation For Gravity Forms Custom Regex Validation Triggers In Error When Add New Line To Post Body Field

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #395668
    nashwicks@gmail.com
    Participant

    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 Thanks

    #395795
    Dinesh
    Keymaster

    Hi 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

    #395851
    nashwicks@gmail.com
    Participant

    Many thanks for your update

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Custom Regex Validation Triggers In Error When Add New Line To Post Body Field’ is closed to new replies.