Currently, I am facing the challenge of implementing a RegEx expression on a property within a model on an MVC website that I am currently developing.
While I understand the individual components of the expression, I am struggling to combine them effectively.
Specifically, I need to restrict the password field to include letters, capital letters, numbers, and symbols, but exclude the space character.
Furthermore, I need to ensure that the user meets the following criteria:
- Input must contain at least 1 capital letter
- Input must contain at least 1 number
- Input must contain at least 1 special character
- Input must not contain the space character
Despite my attempts with the regex shown below, the validation for the space character is not functioning as expected.
^(?=.*\d)(?=.*[a-zA-Z]).{8,}$