public class PasswordValidator : IValidator
{
const int minLength = 8;
const string pattern = "@.,?!£$%^&*()";
public string Message { get; set; } = $"Password should at least {minLength} characters long and should include a special character {pattern}.";
public bool Check(string value) => !string.IsNullOrEmpty(value) && value.Length >= minLength && value.Contains(pattern);
}
When I run this and type in one of the characters from the pattern plus the 8 char, it does not let me validate it. Have I done something wrong?