Uploaded image for project: 'Commons Validator'
  1. Commons Validator
  2. VALIDATOR-104

Email address validation incorrectly accepts commas

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • Nightly Builds
    • None
    • None
    • None
    • Operating System: other
      Platform: Other

    • 17219

    Description

      If a comma is entered into the domain part of an e-mail address, the validation
      should fail, but it accepts it fine. The user part of the e-mail address
      correctly catches this as an error. I tried to figure out how to fix it, but
      the regex stuff there was too convoluted to make sense out of. But did add a
      test case to expose this in EmailTest.java:

      public void testEmailWithCommas() throws ValidatorException

      { ValueBean info = new ValueBean(); info.setValue("joe,blow@apache.org"); valueTest(info, false); info.setValue("joeblow@apa,che.org"); valueTest(info, false); info.setValue("joeblow@apache.o,rg"); valueTest(info, false); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            jakarta@ehatchersolutions.com Erik Hatcher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: