Entry validation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I would like to validate a textbox control that should NOT contain some
specific characters such as "|, $,^".
how can I do it using RegularExpressionValidator, CompareValidator or maybe
CustomValidator.
I know how to use RegularExpressionValidator to validate MUST contain but I
couldn't figure out how the RegularExpression for NOT contain.

pls help
 
Hi,

I would like to validate a textbox control that should NOT contain some
specific characters such as "|, $,^".
how can I do it using RegularExpressionValidator, CompareValidator or maybe
CustomValidator.
I know how to use RegularExpressionValidator to validate MUST contain but I
couldn't figure out how the RegularExpression for NOT contain.

Try this

"\A([^\|\$|\^]*)\Z"
 
Badis,

There are few tools on regular expressions available. This will help you to
figure out thecomplex regular expressions you want.

An msdn artilces is recommending the following tool
http://tools.osherove.com/CoolTools/Regulator/tabid/185/Default.aspx

But i found the following regular expression tool more useful
http://www.sellsbrothers.com/tools/

--
Thanks & Regards,
Sundar Narasiman


Alexey Smirnov said:
Hi,

I would like to validate a textbox control that should NOT contain some
specific characters such as "|, $,^".
how can I do it using RegularExpressionValidator, CompareValidator or maybe
CustomValidator.
I know how to use RegularExpressionValidator to validate MUST contain but I
couldn't figure out how the RegularExpression for NOT contain.

Try this

"\A([^\|\$|\^]*)\Z"
 
Back
Top