PDA

View Full Version : RegEx not working



dreamcaster
2 Mar 2010, 4:02 AM
Hello experts,

I'm working on a simple textfield validation that allows user to enter alpha values only including spaces.

Heres my code snippet:


items: {
xtype: 'textfield'
,vtype: 'alpha'
}

Then my Vtype:


Ext.apply(Ext.form.VTypes, {
alpha: /[a-zA-Z\s]/
});

My only issue is that the space is not working. :( Any help? Thanks :)