Validation doesn't stop

  • Thread starter Thread starter Janaka
  • Start date Start date
J

Janaka

We have a multi-line textbox that we do not want to allow the user to enter
HTML code. I've added a regularexpression validator to the page which
catches the error. However after editing it doesn't remove the error
message. Anyone have this problem?
<asp:RegularExpressionValidator id="sDescValid" ControlToValidate="sDesc"
ValidationExpression="<[^>]*>" Display="Dynamic" ErrorMessage="No HTML code
allowed in description" runat="server" Font-Bold="true"/>
 
Yes it was down to the regular expression checking the wrong thing

Alvin Bruney said:
Your post went unanswered. Have you resolved this issue?

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Janaka said:
We have a multi-line textbox that we do not want to allow the user to enter
HTML code. I've added a regularexpression validator to the page which
catches the error. However after editing it doesn't remove the error
message. Anyone have this problem?
<asp:RegularExpressionValidator id="sDescValid" ControlToValidate="sDesc"
ValidationExpression="<[^>]*>" Display="Dynamic" ErrorMessage="No HTML code
allowed in description" runat="server" Font-Bold="true"/>
 
Back
Top