Anyone having an issue with the SSN RegEx in CommonRules? When I use it on a field that is not a required field, it throws a broken rule. I manually edited the CSLA.CommonRules class and added
|^[/S/s]{0,0}$
to the end of the expression which seems to work; but I do not want to keep track of any modifications to the framework when new releases come out. Any suggestions?
Thanks,
Kelly.
We must be on the same wavelength. See http://forums.lhotka.net/forums/thread/7522.aspx
Jim Wooley
http://devauthority.com/blogs/jwooley
Please don't get me wrong and think that I'm bashing the framework, because I think CSLA is awesome. Just was not sure how the regex rules worked (if they were designed for required fields or what) that's all.
Thanks Rocky.
Kelly.
----- Original Message -----From: RockfordLhotkaSent: Wednesday, October 11, 2006 5:35 PMSubject: Re: [CSLA .NET] SSN RegEx in CommonRulesfwiw, the regex rule allows you to pass in the regex expression - so you could just do that instead of using the pre-supplied SSN expression.
Of all the things I did in 2.0, I think I regret putting any regex expressions into the framework itself the most. What a PITA they turn out to be...
Regarding the idea of returning true for all empty strings - I am skeptical about that being a good idea. At least not unless it is controlled by a flag in the ruleargs parameter so it is your choice as to whether that should happen or not.
Copyright (c) Marimer LLC