Validation doesn't stop

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"/>
 
J

Janaka

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"/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top