Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#9926 closed defect (duplicate)

Email validation textbox not validating properly

Reported by: karthik Owned by: Adam Peller
Priority: high Milestone: tbd
Component: Dijit - Form Version: 1.3.2
Keywords: Email validation textbox Cc:
Blocked By: Blocking:

Description

In dojo 1.3.2 email validation is not carried out properly. Try out this code

<html>
  <head>
    <title>Dojo: Hello World!</title>

    <!-- SECTION 1 -->
    <style type="text/css">
        @import "dojoroot/dijit/themes/tundra/tundra.css";
        @import "dojoroot/dojo/resources/dojo.css"
    </style>
    <script type="text/javascript" src="dojoroot/dojo/dojo.js"
      djConfig="parseOnLoad: true"></script>
	  
	  <!-- SECTION 2 -->
    <script type="text/javascript">
   dojo.require("dijit.form.ValidationTextBox");
   dojo.require("dojox.validate.regexp");
   dojo.require("dojo.parser");
</script>
  </head>

  <body class="tundra">
 <input class="width250" type="text" name="email" id="email" value=""
   dojoType="dijit.form.ValidationTextBox"
   regExpGen="dojox.validate.regexp.emailAddress"
   trim="true" lowercase="true"
   invalidMessage="Invalid Email Address."/></td>
  </button>
  </body>
</html>

When a wrong address like abc@def is typed it shows no error message. Whereas in dojo 1.2 (whose code varies slightly, see dojo campus), email validation works perfectly.

Change History (3)

comment:1 Changed 10 years ago by bill

Owner: set to Adam Peller

Starting in dojox/validate/regexp.js [15874]

new RegExp(dojox.regexp.emailAddress()).test("abc@def")

returns true. It used to return false. That's from ticket #7957 which is meant to allow any TLD, like abc@…, but it doesn't seem like it's meant to allow plain abc@def.

comment:2 Changed 10 years ago by Adam Peller

Resolution: duplicate
Status: newclosed

dup of #9371

comment:3 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.