HTML Inputfield Password pattern

Short Guide for Inputfield Password Patterns:

MINIMUM CHARACTER LENGTH
example for minimum 8 characters

(?=^.{8,}$)

NUMERIC CHARACTER
require at least one number / digit

(?=.*\d)

SPECIAL CHARACTER
require at least one special character

(?=.*\W+)

UPPERlowerCASE
require UpperLowerCase

(?=.*[A-Z])(?=.*[a-z])

END PATTERN

.*$

Example Inputfield Pattern
all code snippets combined

pattern="(?=^.{8,}$)(?=.*\d)(?=.*\W+)(?=.*[A-Z])(?=.*[a-z]).*$"

Leave a Reply

Your email address will not be published.