Hi all,
I have a mobile number text field which accepts only numbers(vtype: 'number'). The max length for this field is 10 characters. When I type a number say, 123-456-7890 it will not allow me to type the '-' and allows only numbers which is perfect. But when I try to paste a number, say 123-456-7890 into the field, it allows the '-' character and removes the last two digits in the number because of the maxlength. Is there a way, I can strip off the special characters while pasting and allow only digits into the field?.
Thanks,
I have a mobile number text field which accepts only numbers(vtype: 'number'). The max length for this field is 10 characters. When I type a number say, 123-456-7890 it will not allow me to type the '-' and allows only numbers which is perfect. But when I try to paste a number, say 123-456-7890 into the field, it allows the '-' character and removes the last two digits in the number because of the maxlength. Is there a way, I can strip off the special characters while pasting and allow only digits into the field?.
Thanks,
How to remove Hyphen(-) characters while pasting a mobile number?
Aucun commentaire:
Enregistrer un commentaire