CustomRegularExpressionValidatorValidationRule.cs

Oct 1, 2008 at 7:32 PM
Edited Oct 1, 2008 at 7:34 PM
Hi Gael, great project!! I was looking for something like this as I'm trying to learn how to build Features, Solutions etc.

I just learned about these RegEx's.

I've been trying to recreate what you did so I can better understand how everything fits together, however, in the "CustomRegularExpressionValidatorValidationRule.cs" class file, I can't seemt o get rid of those pesky NameSpace not found errors for:
 
public override ValidationResult

and subsequent 2 return new ValidationResult(false....

even though when I open your file, there's no red underlining, however, in the source code, I am unable to open the project with VS2008.

Thanks again

Carl.
Oct 1, 2008 at 8:04 PM
Edited Oct 1, 2008 at 8:33 PM
or, it possible to get a copy of the dll so that I can package a feature with an icon?  

I'm using the following References, are these correct?

-Microsoft.SharePoint
-System
-System.Core
-System.Data
-System.Data.DataSetExtensions
-System.Web
-System.Windows.Controls (I had to locate through Silverlight ??)
-System.Xml
-System.Xml.Linq

Merci CW
Coordinator
Oct 1, 2008 at 11:44 PM
Edited Oct 1, 2008 at 11:45 PM
Hi Carl,

The CustomRegularExpressionValidatorValidationRule class is the class who manages the validation of the textbox value. This class is fired when SharePoint stores the result (quite similar to the Page.IsValid()).

This class inherits from System.Windows.Controls.ValidationRule (http://msdn.microsoft.com/en-us/library/system.windows.controls.validationrule.aspx) contains in the PresentationFramework assembly (Framework 3.0).

So maybe try to check if .Net 3.0 is install on your machine and if the reference is added to your VS project.

Gael
Oct 2, 2008 at 2:13 PM

Thanks very much for the response Gael. Yes the PresentationFramework.dll worked.  I figured since it was using System.Windows.Controls it followed, to me, that .validationrule would fall under System.Windows.Controls.dll. Go figure, must be my inexperience with all this, but it is fascinating.

Great solution, it’s exactly what I was trying to do/learn.

Cheers

Carl

From: GaelDuhamel [mailto:notifications@codeplex.com]
Sent: Wednesday, October 01, 2008 6:44 PM
To: Williams,Carl [Ontario]
Subject: Re: CustomRegularExpressionValidatorValidationRule.cs [SharePointRegEx:36837]

From: GaelDuhamel

Hi Carl,

The CustomRegularExpressionValidatorValidationRule class is the class who manages the validation of the textbox value. This class is fired when SharePoint stores the result (quite similar to the Page.IsValid()).

This class inherits from System.Windows.Controls.ValidationRule (http://msdn.microsoft.com/en-us/library/system.windows.controls.validationrule.aspx) contains in the PresentationFramework assembly (Framework 3.0).

So maybe try to check if .Net 3.0 is install on your machine and if the referenc is added to your VS project.

Gael

Read the full discussion online.

To add a post to this discussion, reply to this email (SharePointRegEx@discussions.codeplex.com)

To start a new discussion for this project, email SharePointRegEx@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com