That's what I'm looking for:
[RequiredIf("IsNewClient", true, ErrorMessage =*The value of other (string) property*)]
That's would be even better:
[RequiredIf("IsNewClient", true, ErrorMessage =*Calling a function and get the value*)]
That's what I'm looking for:
[RequiredIf("IsNewClient", true, ErrorMessage =*The value of other (string) property*)]
That's would be even better:
[RequiredIf("IsNewClient", true, ErrorMessage =*Calling a function and get the value*)]
You can use a similar approach like that:
[RequiredIf("GoAbroad == true")]
public string PassportNumber { get; set; }
For more information have a look at ExpressiveAnnotations. Hope this helps...