Typing an invalid email on an Form email field type will be correctly validated as long as the string has a valid email address

XMLWordPrintable

    • 2

      Issue Summary

      Typing an invalid email on an Form email field type will be correctly validated as long as the string has a valid email address, for example:
      Test String <ts@test.com>

      Steps to Reproduce

      1. Add the Email field type to a Form
      2. Test the Form and type any string that has a valid email address on the Email field, but also blank spaces among other characters that make the email address invalid

      Expected Results

      A message should appear indicating the email entered is invalid

      Actual Results

      The email seems to be correctly validated as no errors/warnings are shown

      Workaround

      Add a text field type (Short text or Long text) that has checked the Must match regex pattern validation and add the following regex expression:

      ^(?=.{1,81}$)[\w\.-]+@[\w\.-]+\.\w{2,4}$
      

      This second version filters even more invalid email addresses:

      ^(?=.{1,81}$)[\w\.-]+@[A-Za-z0-9](?:[\w-]*[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[\w-]*[A-Za-z0-9])?)*\.[A-Za-z]{2,4}$ 
      

      This will prevent any invalid email address to be entered. This and other regex patterns are also available here.

            Assignee:
            Unassigned
            Reporter:
            K. Ariga
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: