This is very basic and not thorough validation I know but the textbox needs to accept for example name@email.com as well as 4556-222-44444.
I've tried
<asp:RegularExpressionValidator Display="Dynamic" runat="server" ControlToValidate="txtAddToBlacklist"
ErrorMessage="Invalid" ValidationExpression="^[\-\@]$"></asp:RegularExpressionValidator>
This attempt included the escaping backslashes to no avail.
My logic for using "[-@]" to check for either to be present came from this answer.
I know that the hyphen has to be at the beginning or the end but as it's only two characters, I don't think this is the issue.
The ^ and $ are included as that seems to be recommended practice to prevent malicious extras being appended.
Must be missing something though so any help is appreciated!