Checking whether the password have whitespaces or not

In this post under Passay, I will explain with example the purpose of “WhitespaceRule”. Sometimes user chooses a password that will have whitespaces. If you want to restrict user from creating a password that does have whitespaces, you can use “WhitespaceRule” class. “WhitespaceRule” class makes sure that the password set by the user doesn’t have…… Continue reading Checking whether the password have whitespaces or not

Checking whether password contains username or not

In this post under Passay, I will show with example the purpose and how to use “UsernameRule” class. When a user register on a website they come up with username and password. They tend to create a password that is easy to remember for example using DOB as password, nick name as password etc. Sometimes…… Continue reading Checking whether password contains username or not

IllegalCharacterRule example

In this post under Passay, I will explain with example the purpose and how to use “IllegalCharacterRule” class. In the previous, I explained the purpose of “AllowedCharacterRule” class. The class “IllegalCharacterRule” is the opposite of “AllowedCharacterRule”. In “AllowedCharacterRule” we create an array of characters that should be allowed in the password text. In other words…… Continue reading IllegalCharacterRule example

HaveIBeenPwnedRule setAllowOnException method example

In previous post under Passay, I showed with example how to use “HaveIBeenPwnedRule” rule. Just for recap, there is a website “haveibeenpwned.com” that contains a list of real world passwords that were previously used and exposed as part of data breaches. This rule will check user enteredpassword against that database. If password is already present,…… Continue reading HaveIBeenPwnedRule setAllowOnException method example

HaveIBeenPwnedRule setAllowExposed method example

In previous post under Passay, I showed with example how to use “HaveIBeenPwnedRule” rule. In this post, I will explain with example the purpose of “setAllowExposed” method of “HaveIBeenPwnedRule” rule class. Just for recap, there is a website “haveibeenpwned.com” that contains a list of real world passwords that were previously used and exposed as part…… Continue reading HaveIBeenPwnedRule setAllowExposed method example

NumberRangeRule example

In this post under Passay, I will explain with example the purpose of “NumberRangeRule” class. NumberRangeRule takes a range of numbers and verifies whether the user entered password doesn’t contain numbers in that range. So “NumberRangeRule” constructor takes two arguments1) starting number (inclusive)2) ending number (exclusive) Below is the complete Main class for your reference…… Continue reading NumberRangeRule example