I have bee using model validation in asp.net MVC website. I want to have a functionality to prevent user from entering whitespace in testbox and submit the form.
The
[RegularExpression(@"[^\s]+")] public string Data { get; set; }