I am using ExtJs NumberField. The good thing is it validates that only numbers are entered. But I want a hyphen as well. How could I go about editing the javascript
var <portlet:namespace/>issueNoField = new Ext.form.NumberField({ //This takes only numbers
fieldLabel: 'Issue No',
width: 120,
displayField: 'Enter no',
valueField:'IssNo'
});
var <portlet:namespace/>issueNoField = new Ext.form.TextField({ //This takes only numbers
fieldLabel: 'Issue No',
width: 120,
regex: /[1-9-]*/
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With