• Post Reply Bookmark Topic Watch Topic
  • New Topic

jQuery function which validates that a field contains digits and at least one number.  RSS feed

 
Isaac Ferguson
Ranch Hand
Posts: 1053
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I search for a jQuery function which validates that a field contains digits and at least one number.

Any idea, please?

Regards, Isaac
 
Stephan van Hulst
Saloon Keeper
Posts: 6846
100
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you mean letters instead of digits?

What is this for? If you're trying to enforce password requirements, don't do this. The only requirement a password should have is that it's long enough.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65768
131
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stephan van Hulst wrote:The only requirement a password should have is that it's long enough.

I wish I could give this a thousand billion thumbs up!

If you have a non-password reason to do this, that's not what jQuery is for. You can either figure out how to write your own check function, or perhaps investigate using a regular expression.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!