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


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
Notify of
Newest Most Voted
Inline Feedbacks
View all comments
Pierre van Rensburg
Pierre van Rensburg
2 years ago Tried it, but want to implement it slightly different, not working. Got any tips?

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

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

Pierre van Rensburg
Pierre van Rensburg
2 years ago

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

2 years ago

okay Protection Status
Would love your thoughts, please comment.x