Hi,
Is there any possibility to call a specific validation rule defined for a property? I have more rules associated, but at some point I need to call just one from the collection.
Thanks,
George
Not as far as I know. You can though call all rules for a
specific property - ValidtionRules.CheckRules(“SomeProperty”).
Sergey Barskiy
Senior Consultant
office: 678.405.0687 |
mobile: 404.388.1899
Magenic ®
Microsoft Worldwide Partner of the Year | Custom
Development Solutions, Technical Innovation
From: ixman
[mailto:cslanet@lhotka.net]
Sent: Monday, June 23, 2008 2:58 PM
To: Sergey Barskiy
Subject: [CSLA .NET] Invoke/Call specific validation rule from
ValidationRules
Hi,
Is there any possibility to call a specific validation rule defined for a
property? I have more rules associated, but at some point I need to call
just one from the collection.
Thanks,
George
Hi,
Thanks for the quick feedback... Yes, I knew that... I just wanted to know if there is an "official" way to call a specific rule on a property...or a workaround...
Thanks,
George
There is no way to do specifically what you ask.
But using priorities and short-circuiting techniques you could (in theory) come up with a scheme by which that rule runs first, and in the scenario where it should be the only one to run it would prevent any subsequent rules from running.
Thanks Rocky,
I'll go this path... using the priorities and short-circuiting algorithm...
George
Copyright (c) Marimer LLC