.NETGURU
require AND validate
Messages   Related Types
This message was discovered on ASPFriends.com 'aspng-validators' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Carson McComas
What's the simplest method for both validating and requiring a certain
field?

For example, I have a field for an e-mail address.
I want to require the field AND validate it for email address.

One solution is to put 2 validators on the control but I would really
prefer not to do that.

Hope someone can help.

Carson

Reply to this message...
 
    
Dennis West
This should do both go to with a small modification

http://aspalliance.com/dotnetsolutions/GetSolution.aspx?ID=1016 and Modify
iT

Just Modify this email expression email -- remove the [ \t]*

----- Original Message -----
From: "Carson McComas" <Click here to reveal e-mail address>
To: "aspng-validators" <Click here to reveal e-mail address>
Sent: Monday, April 08, 2002 11:25 PM
Subject: [aspng-validators] require AND validate

[Original message clipped]

Reply to this message...
 
    
Dennis West
Also read http://aspalliance.com/dotnetsolutions/GetSolution.aspx?ID=262

a.. The RegularExpressionValidator allows us to require certain formats for
the input, such as an e-mail address (a couple charaters, the @ sign, a
couple more characters, a period, and a couple more characters).

----- Original Message -----
From: "Carson McComas" <Click here to reveal e-mail address>
To: "aspng-validators" <Click here to reveal e-mail address>
Sent: Monday, April 08, 2002 11:25 PM
Subject: [aspng-validators] require AND validate

[Original message clipped]

Reply to this message...
 
    
Steven A Smith (VIP)
You cannot use a RegularExpressionValidator to Require input. This is by
design, but it does mean that you need 2 validators. As an alternative, you
can either write your own custom control that encapsulates this or use a
third-party tool like the EmailBox VControl that is currently in beta at
http://aspsmith.com/vcontrols/" target="_blank">http://aspsmith.com/vcontrols/ that is a single control that includes a
textbox and all the validation necessary to require, check format, and check
MX record of an email address.

Steve

Steven Smith, MCSE+Internet, Microsoft MVP: ASP.NET
Click here to reveal e-mail address
President, ASPAlliance.com
http://aspalliance.com The #1 ASP.NET Community
http://aspsmith.com ASP.NET Training for ASP Developers

Learning ASP.NET? Get My Book: ASP.NET By Example
http://www.amazon.com/exec/obidos/ASIN/0789725622/stevenatorasp/
----- Original Message -----
From: "Carson McComas" <Click here to reveal e-mail address>
To: "aspng-validators" <Click here to reveal e-mail address>
Sent: Tuesday, April 09, 2002 2:25 AM
Subject: [aspng-validators] require AND validate

[Original message clipped]

Reply to this message...
 
 
System.Web.UI.MobileControls.RegularExpressionValidator
System.Web.UI.WebControls.RegularExpressionValidator




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification