Regular expression in the model
[RegularExpression("!^search for name or lastname", ErrorMessage = "Invalid search")]
public string SearchText { get; set; }
I have a textbox with default value "search for name or lastname" and onfocus I delete the value.
But if the user clicks the search button without entering in the text in the textbox, I want the regular expression to capture it, how do I fix the regular expression to if textbox value is "search for name or lastname" then show error message. Exact match.
Thanks