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 Model annotation of the view to validate it works, but when I do in the regex.IsMatch(" qqq11")
service it returns true
, where it should bring false
.