This is my current regex check:
const validPassword = (password) => password.match(/^(?=.*\d)(?=.\S)(?=.*[a-zA-Z]).{6,}$/);
I have a check for at least 1 letter and 1 number and at least 6 characters long. However I also want to make sure that there are no spaces anywhere in the string.
So far I'm able to enter in 6 character strings with spaces included :(
Found this answer here, but for some reason in my code it's passing.
What is the regular expression for matching that contains no white space in between text?