Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4569

EmailValidator flags .tech emails as invalid

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.24
    • Fix Version/s: 2.3.28, 2.5
    • Component/s: XML Validators
    • Labels:
      None
    • Environment:

      Linux, AWS

      Description

      I've a customer with .tech email who gets an invalid email error message, my validation.xml contains the following

      <!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd">
      
      <validators>
      	<field name="emailAddress">
      		<field-validator type="requiredstring">
      			<message key="error.email.required" />
      		</field-validator>
      		<field-validator type="email">
      			<message key="error.email.invalid" />
      		</field-validator>
      	</field>
          <field name="password">
              <field-validator type="requiredstring">
                  <message key="error.password.required"/>
              </field-validator>
          </field>
      </validators>
      

      After checking the documentation at
      https://struts.apache.org/docs/email-validator.html it seems the pattern doesn't not include .tech domain, which I believe were introduced in March 2015:

      \\b^['_a-z0-9-\\+](\\.['_a-z0-9-\\+])@[a-z0-9-](\\.[a-z0-9-])\\.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|nato|net|org|pro|tel|travel|xxx)$\\b
      

      Any workaround would be appreciated

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              omer.dawelbeit@gmail.com Omer Dawelbeit
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: