Uploaded image for project: 'Lucee Development'
  1. LDEV-1281

cfinput validate="email" client-side JS should be case insensitive

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.5.4.017
    • Fix Version/s: 5.2.8.40
    • Labels:
      None
    • Sprint:
      May 2018 Sprint

      Description

      On a basic form using the built in form field validation, the client side javascript rejects email addresses with capital letters as not being an email address. I actually reported this to railo a few years back - it eventually got fixed there.

      E.g. "Test@example.com" fails and triggers the JS pop-up. "test@example.com" validates fine.

      Here's the line from the code (it's not too special):
      <cfinput name = "email" type = "text" value = "" maxlength = "90" validate="email" required="yes">

      My current workaround is to edit the Javascript in the /lucee/context/form.cfm file, approx. line 518, and add ".toLowerCase()" to the "if" line, so that:

      if(!pattern.test(value))

      becomes:

      if(!pattern.test(value.toLowerCase()))

      Thanks.

      LC

        Attachments

          Activity

            People

            • Assignee:
              21solutions Igal Sapir
              Reporter:
              lenchan Leonard
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: