Link Details

Link 1084907 thumbnail
User 1064749 avatar

By learnphp222
Published: Dec 23 2013 / 12:20

Passwords are very important security matters. How can the web developer be sure, that some security guidelines were implemented when passwords are set? Here is a password validation function, that might be useful:
  • 11
  • 1
  • 591
  • 1315
User 343374 avatar

stymiee replied ago:

2 votes Vote down Vote up Reply

A better way to do this would be to use only one regex instead of four plus two other error checks: if (!preg_match('/^(?=[a-z])(?=[A-Z])(?=[^\W\D])[a-zA-Z]{6,}$/', $pwd)) { // error }

Add your comment

Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Apache Hadoop
Written by: Piotr Krewski
Featured Refcardz: Top Refcardz:
  1. Play
  2. Akka
  3. Design Patterns
  4. OO JS
  5. Cont. Delivery
  1. Play
  2. Java Performance
  3. Akka
  4. REST
  5. Java