Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / May 2008

Tip: Looking for answers? Try searching our database.

Validator

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
win - 21 May 2008 11:19 GMT
I am using a RegularExpressionValidator and the ValidationExpression is
"/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/"

It still have errorMessage.

Can anyone help me?

Thanks
Mark Rae [MVP] - 21 May 2008 11:29 GMT
> It still have errorMessage.
>
> Can anyone help me?

Not until you actually tell us what the error message is...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Hans Kesting - 21 May 2008 12:25 GMT
> I am using a RegularExpressionValidator and the ValidationExpression is
> "/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/"
[quoted text clipped - 4 lines]
>
> Thanks

You probably don't want the "/" at the beginning and end: they would be
interpreted as literal "/" characters to match against, NOT regex
delimiters.
Also you don't need the ^ and $ here: the RegexValidator checks that the
entire string matches (as opposed to only a substring).

Hans Kesting
Steven Cheng [MSFT] - 22 May 2008 04:04 GMT
Hi Win,

As for the regular expression error, do you mean that the ASP.NET page will
raise exception when you try running the page that contains the regular
expressioni validator? Or you means the validator control will display
validation error?

For syntax of regex in ASP.NET context, you can refer to the following
articles:

#How To: Use Regular Expressions to Constrain Input in ASP.NET
http://msdn.microsoft.com/en-us/library/ms998267.aspx

#Regular Expressions in ASP.NET
http://msdn.microsoft.com/en-us/library/ms972966.aspx#regexnet_topic9

BTW, the regulator is a good regex tool built with .NET framework, I think
it will be helpful when we editing regex that will be used in .net
application:

http://sourceforge.net/projects/regulator

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: "win" <a@a.com>
>Subject: Validator
>Date: Wed, 21 May 2008 18:19:23 +0800

>I am using a RegularExpressionValidator and the ValidationExpression is
>"/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/"
[quoted text clipped - 4 lines]
>
>Thanks
Steven Cheng [MSFT] - 26 May 2008 11:27 GMT
Hi Win,

Have you got any progress on this issue? If you need any other help,
welcome to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>Content-Transfer-Encoding: 7bit
>From: stcheng@online.microsoft.com (Steven Cheng [MSFT])
>Organization: Microsoft
>Date: Thu, 22 May 2008 03:04:17 GMT
>Subject: RE: Validator

>Hi Win,
>
[quoted text clipped - 51 lines]
>>
>>Thanks

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.