Subscribe to sricharan's PHP Blog        RSS Feed
- - - - -

Regex password validation in javascript

Icon Leave Comment
In this first example, the password must be at least 8 characters long and start and end with a letter.

var re = /^[A-Za-z]\w{6,}[A-Za-z]$/;if (!re.test(myString)) { alert("Please enter a valid password!"); }
...

Page 1 of 1

May 2013

S M T W T F S
      1234
567891011
12131415161718
19202122 23 2425
262728293031 

Recent Entries

Search My Blog

0 user(s) viewing

0 Guests
0 member(s)
0 anonymous member(s)