ExtJS, email validation (regex)

·

·

ExtJS doesn’t support email validation with all real world email addresses using vtype :’email’….. but ExtJS has given us regex config for any textfield….. so idea is to use that regex for email validation on any textfield used for storing email……

ExtJS, Email Validation using regex

validate email field using regex for emails which contains special characters or that Sencha doesn’t support.

Example Code For Email
Mavericks-blog@mavendeveloper.com.us

xtype: 'textfield',
fieldLabel: 'email',
regex: /^([\w\-\'\-]+)(\.[\w-\'\-]+)*@([\w\-]+\.){1,5}([A-Za-z]){2,4}$/,

Test Your Regular Expression Online.

[xyz-ips snippet=”regExTester”]