How to validate password with regular expression,PHP

Today’s post is about password validation in PHP using Regular Expressions.

Here is the small use full Password Validation function.

Password Regular Expression Pattern

$S*(?=S{8,})(?=S*[a-z])(?=S*[A-Z])(?=S*[d])(?=S*[W])S*$

Regular Expression Pattern Description

The whole combination means, at list 8 characters string with at least one digit, one upper case letter, one lower case letter and one special symbol. This regular expression pattern is very useful to implement a strong and complex password.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

0 0 vote
Article Rating
Subscribe
Notify of
guest
6 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Pierre van Rensburg
Pierre van Rensburg
2 years ago

https://uploads.disquscdn.com/images/8f68d60a45669bfc18384cab6a6da3cf34cb7f79e0b13cb196fc517e94e4413e.png Tried it, but want to implement it slightly different, not working. Got any tips?

arjun
2 years ago

are you getting any error? instead of image can you post code. So that I can try from my end And what is your PHP version.

Pierre van Rensburg
Pierre van Rensburg
2 years ago
Reply to  arjun

https://uploads.disquscdn.com/images/966a8f89b0dbdf2b7a1af436dce78eb66ee73e3ace6634d2f5c860a397413072.png

No error, just doesn’t work, so just for now i decided to do the following, see image. You can clone my project form github and see what i’m busy working on http://github.com/PeerInnoveer/camagru.git

Pierre van Rensburg
Pierre van Rensburg
2 years ago

it just failed to work, so i decided to do it a little different.

arjun
2 years ago

okay

DMCA.com Protection Status
6
0
Would love your thoughts, please comment.x
()
x