Advertisement

03.20.2008 at 11:35AM PDT, ID: 23257947
[x]
Attachment Details

email validator catches extra space

Asked by -Dman100- in Programming for ASP.NET, Visual Studio .NET 2005

I am validating an email field and I'm using the regular expression validator to verify the email is valid.  However, when there is an extra space before or after the email address, the validator see the email adress as invalid.

How can I trim the value of the email field before the email validator runs?  I'm running the validators server-side at runtime.

I can use the trim method, but where do I trim the value of the text field before the validation runs?

Thanks for any help.Start Free Trial
[+][-]03.20.2008 at 11:49AM PDT, ID: 21174509

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Programming for ASP.NET, Visual Studio .NET 2005
Sign Up Now!
Solution Provided By: MaxOvrdrv2
Participating Experts: 1
Solution Grade: A
 
 
[+][-]03.20.2008 at 11:49AM PDT, ID: 21174517

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628