I have a text box. I added a regular expression to validate the text box that can contain one or 20 characters as below
<asp:RegularExpressionValidator ID="regex" runat="server"
ErrorMessage="This contain pipe or more than 20 characters"
ValidationExpression="^.{1,20}$"
ControlToValidate="txtRegexTester" >
</asp:RegularExpressionValidator>
I want to make sure the text box does not contain the PIPE (|) symbol also. How do I achieve both in one ValidationExpression?