B
Bryce Budd
Hi all,
I am trying to use a regular expression validator to check
for the existence of PO Box in an address textbox. The
business rule is "No addresses with PO Boxes are allowed."
What I want to happen is the Regular Expression Validator
to return false only when the string contains PO Box.
Currently it is false even when a valid address exists.
I need this validation to occur on the client, hence the
Regular Expression Validator control.
Here's the RE: I'm using in the ValidationExpression
property:
[^(P\.?\s?O\.?\sBox)+]
This currently matches (returns false/invalid) for:
smith road and smith po box road?
Any insight into the proper regular expression to achieve
my goal would be greatly appreciated.
Thanks in advance,
Bryce
I am trying to use a regular expression validator to check
for the existence of PO Box in an address textbox. The
business rule is "No addresses with PO Boxes are allowed."
What I want to happen is the Regular Expression Validator
to return false only when the string contains PO Box.
Currently it is false even when a valid address exists.
I need this validation to occur on the client, hence the
Regular Expression Validator control.
Here's the RE: I'm using in the ValidationExpression
property:
[^(P\.?\s?O\.?\sBox)+]
This currently matches (returns false/invalid) for:
smith road and smith po box road?
Any insight into the proper regular expression to achieve
my goal would be greatly appreciated.
Thanks in advance,
Bryce