ExtJS, email validation (regex)
August 7, 2009
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……
Email Validation How to
validate email field using regex for emails which contains ‘ character as well….
for example :
abc-123.abc’snepal@mavendeveloper.com
Example
xtype: ‘textfield’,
fieldLabel: ‘email’,
regex: /^([\w\-\'\-]+)(\.[\w-\'\-]+)*@([\w\-]+\.){1,5}([A-Za-z]){2,4}$/,
cheers
hav fun
ExtJS, email validation using regex

![[del.icio.us]](http://mavendeveloper.com/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://mavendeveloper.com/wp-content/plugins/bookmarkify/digg.png)
![[dzone]](http://mavendeveloper.com/wp-content/plugins/bookmarkify/dzone.png)
![[Facebook]](http://mavendeveloper.com/wp-content/plugins/bookmarkify/facebook.png)
![[Friendsite]](http://mavendeveloper.com/wp-content/plugins/bookmarkify/friendsite.png)
![[Google]](http://mavendeveloper.com/wp-content/plugins/bookmarkify/google.png)
![[LinkedIn]](http://mavendeveloper.com/wp-content/plugins/bookmarkify/linkedin.png)
![[MySpace]](http://mavendeveloper.com/wp-content/plugins/bookmarkify/myspace.png)
![[Twitter]](http://mavendeveloper.com/wp-content/plugins/bookmarkify/twitter.png)
![[Windows Live]](http://mavendeveloper.com/wp-content/plugins/bookmarkify/windowslive.png)
![[Yahoo!]](http://mavendeveloper.com/wp-content/plugins/bookmarkify/yahoo.png)
![[Email]](http://mavendeveloper.com/wp-content/plugins/bookmarkify/email.png)