Validate an Id to a List

Validate an Id to a List

Old forum URL: forums.lhotka.net/forums/t/3187.aspx


lprada posted on Friday, July 13, 2007

HI, i have a CountryList BO and a Person with a CountryId property. I want to make a rule that the CountryId has to be in the CountryList. Any suggestions?

RockfordLhotka replied on Friday, July 13, 2007

Have you looked at the ValidRole() rule method in the Assignment class in ProjectTracker?

lprada replied on Friday, July 13, 2007

nop until now, But Now I have another question. Is posible to create a generic common rule to validate the id?

RockfordLhotka replied on Friday, July 13, 2007

You might be able to pass the list type (or list instance?) through a custom RuleArgs class, otherwise I’m not sure how you’d pull it off.

 

Rocky

 

 

From: lprada [mailto:cslanet@lhotka.net]
Sent: Friday, July 13, 2007 2:00 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] Validate an Id to a List

 

nop until now, But Now I have another question. Is posible to create a generic common rule to validate the id?

Copyright (c) Marimer LLC