I’m making a contact form which will be submitted with jQuery and I’m stuck on one simple validation.
I need to validate a field, which has to have at least x integers.
How can I do this?
p.s: please don’t suggest validation plugin.
Thanks,
edit: This is what I’ve tried, but it’s wrong I guess.
var numbercheck = /^(\w\d{7,14})?$/;
this is jsdiffle:
Use
regexproviding the range of numbers you can afford in your fieldlike
\d{5,10} // Here 5 -10 is the range of numbers