I have an entity and one attribute is required depending of some clauses. I tried to use RequiredIf but it is not working 'cause is not possible to add 2 RequiredIf in the same property.
I need to do something like this, but it is not the right way:
[RequiredIf("CountryId", 1, ErrorMessageResourceType = typeof(Resources.Contato.Contato), ErrorMessageResourceName = "MensagemNumeroConselho")]
[RequiredIf("AreaId", 1, ErrorMessageResourceType = typeof(Resources.Contato.Contato), ErrorMessageResourceName = "MensagemNumeroConselho")]
public string Number { get; set; }
Is there a way to do this?