I am practicing regular expressions and I need a regular expression to force the user to write at least one number and at least one letter when writing the password. How can I do it? I'm using this:
'^[A-Za-z0-9ñÑáéíóúÁÉÍÓÚ ]+$'
and it does not work. this pattern is not fulfilled, I only introduce numbers and it does not require to have at least one letter.
In my real code I use:
Validators.pattern('^[A-Za-z0-9ñÑáéíóúÁÉÍÓÚ ]+$')
For example I need validate the string
123456789a
And not works