[a-zA-Z'-‘Ãâå\s]{1,40}
...
using System.Text.RegularExpressions;
...
Regex.IsMatch(s, @"^[a-zA-Z'-‘Ãâå\s]{1,40}$" )
...
Generally most input validation should be pessimistic and allow only input that consists entirely of approved characters. In this way, may user encounter with some restrictions but it helps to protect against malicious input such as SQL injection attacks.
No comments:
Post a Comment