Re: Valid regular expression not working with validator control
- From: Jesse Houwing <jesse.houwing@xxxxxxxxxxxxxxxx>
- Date: Wed, 5 Mar 2008 00:01:37 +0000 (UTC)
Hello Andrew,
Hi
I get a JavaScript error with this expression when using the
RegExpValidator. Also if I switch off client script the server side
code validator finds a match regardless of the entered string.
(?<!@emailaddressnotallowed\.org)$
Is there a way of writing this so it works with the validator in both
client side and server side?
Look behinds are not supported in Client Side code. So you need to rewrite this to either a full expression or to use a look ahead like this:
^regexuptothe@(?!emailaddressnotallowed\.org$)restofthedomainregex$
--
Jesse Houwing
jesse.houwing at sogeti.nl
.
- Follow-Ups:
- Re: Valid regular expression not working with validator control
- From: Andrew Jocelyn
- Re: Valid regular expression not working with validator control
- References:
- Valid regular expression not working with validator control
- From: Andrew Jocelyn
- Valid regular expression not working with validator control
- Prev by Date: Re: Sort Direction in ObjectDataSource?
- Next by Date: Re: One Usercontrol Multiple Instance in a Single Page --Required Fiel
- Previous by thread: Valid regular expression not working with validator control
- Next by thread: Re: Valid regular expression not working with validator control
- Index(es):
Relevant Pages
|