I have two regular expression.
[RegularExpression(@".*[^ ].*", ErrorMessage ="Something")]
validate string that only contains spaces(Not any other characters Ex:" ".length = 7
).[RegularExpression(@"^[^~!@#$%&*]+$", ErrorMessage = "something")]
validate string that contains~!@#$%&*
special characters.
How can I combine both regex into one, because Duplicate Regular expression annotation is not allowed in asp.net mvc.