Solved

MVC validation question

Posted on 2013-02-04
2
188 Views
Last Modified: 2013-02-04
Hello all,

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; }
    }

Open in new window


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.
0
Comment
Question by:sbornstein2
2 Comments
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 250 total points
ID: 38851842
0
 

Author Closing Comment

by:sbornstein2
ID: 38852068
thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Jquey and footrable 2 35
Server Error 11 47
Using C#, how could you improve upon my method of writing out a merged, compressed file? 2 33
Entity Framework 7 30
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now