Regex for email validation not working in Spring DOJO

I want to validate an email address using Spring Decoration of DOJO framework. but the regex which used to work in normal validation is not working.

Spring.addDecoration(new Spring.ElementDecoration({
elementId: “emailAddress”,
widgetType: “dijit.form.ValidationTextBox”,
regExp : “/^[w.=-]+@[w.-]+.[w]{2,4}$/”,
invalidMessage:”Invalid format for email Address.

Pls let me know Why my regExp is not working here in Spring decoration of DOJO?

Source: regex

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.