Thanks Gustavo! Is there any way to make this a little more generic so you
can reuse the validator across different objects? Ideally I'd like to do
something like this:
[AreEqual("GroupName")]
public string SomeProperty { ... }
[AreEqual("GroupName")]
public string SomeProperty { ... }
but there doesn't seem to be a way to get the class instance from a
property-level attribute?
Thanks
James
2009/3/30 Gustavo Ringel <[email protected]>
> you can create a class attribute for this. Check the AssertAnimalAttribute
> in tests, you can easily get the animal there and check if two properties
> are the same.
>
> Gustavo.
>
>
> On Mon, Mar 30, 2009 at 1:58 PM, James Crowley <[email protected]>wrote:
>
>> Is there any way to set up composite validation? For instance, on a UI
>> object that has "Password" and "PasswordConfirm", and they need to both
>> equal the same value?
>>
>> I've seen this in other frameworks, but not nhibernate validator?
>>
>> Thanks
>>
>> James
>>
>>
>>
>
> >
>
--
James Crowley
Managing Director
Developer Fusion - Connecting developers worldwide
Developer Fusion Ltd | 58 Sandringham Close | Enfield, EN1 3JH
mob: 07986 624128 web: http://www.developerfusion.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---