I want to make my password to contain lowercase, uppercase, 8 characters and a character
If you want to restrict user to enter minimum 8 character password which will contain upper and lower case letter and one special character you can use regular expression like ^((?=(?:.*[a-zA-Z]){7})(?=(?:.*[@#$%^?])).{8})$