Link Details

Link 1084907 thumbnail
User 1064749 avatar

By learnphp222
via advancedphptutorial.blogspot.in
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
  • 476
  • 1310

Comments

Add your comment
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.

Voters For This Link (11)



Voters Against This Link (1)



Java EE7
Written by: Andrew Lee Rubinger
Featured Refcardz: Top Refcardz:
  1. Design Patterns
  2. OO JS
  3. Cont. Delivery
  4. CI Patterns
  5. CI Tools
  1. Spring Integration
  2. Git
  3. Regex
  4. Java
  5. REST