views:

30

answers:

0

Hello. I've a small inheritance-tree like this:

BaseGuest -> GuestA -> GuestB -> GuestC

BaseGuest has a member 'Firstname' which is required for GuestA and GuestB, but not GuestC. So I've there are Required-Annotations on GuestA.Firstname and GuestB.Firstname.

[Required(ErrorMessageResourceName = "FirstNameRequired", ErrorMessageResourceType = typeof(ErrorResources))]
        public string FirstName { get; set; }

The validation at serverside works, but not in the silverlight-client. When I define the Required-Attributes in the baseclass BaseGuest, all works fine (server + client).

I could write custom validationrules for this, but I really hope there is a better solution for this.