1
I have the following Regex
(?=.*\d)(?!.*\s)(?=.*[a-zA-Z\s]).{6,12}
If I do tests on site that test Regex, it works, in the view Model Annotation to validate works, but when I do in service regex.IsMatch(" qqq11")
he returns true
, where it should bring false
.
Removing spaces from the beginning and end of the string before validating?
– Marcelo Aymone