Iam working with ext js.I have a textfield that should accept either an integer or a decimal number. Iam using regular expression to implement that. But its not working.
Here is my code...
{
xtype: 'textfield',
id: 'myField',
fieldLabel: 'Text Field(numbers-only)',
maskRe: /[0-9]+(\.[0-9]+)?$/
}
While using the above regular expression, Textfield is not accepting .(dot)
How can I resolve this??
Use Below code:
{
xtype: 'textfield',
id: 'myField',
fieldLabel: 'Text Field(numbers-only)',
maskRe: /^[1-9]\d*(\.\d+)?$/
}
Per your Understanding purpose see this link Click Here
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