sbornstein2
asked on
MVC validation question
Hello all,
I have the following in my model a class:
I need to add validation that the user has to have either MemberId OR Last, First and Dob. How can I add the attributes for this check. Not sure if I use ValidationMessageFor after this as well.
Thanks for any help.
I have the following in my model a class:
public class PatientSearchModel
{
//Patient Info
public string MemberId { get; set; }
public string PatientLastName { get; set; }
public string PatientFirstName { get; set; }
public string PatientDob { get; set; }
}
I need to add validation that the user has to have either MemberId OR Last, First and Dob. How can I add the attributes for this check. Not sure if I use ValidationMessageFor after this as well.
Thanks for any help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER