Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6789365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:35:43+00:00 2026-05-26T17:35:43+00:00

I need to do some model-level validation in an MVC 3 edit page. (To

  • 0

I need to do some model-level validation in an MVC 3 edit page. (To be specific, I need to confirm that either Field A or Field B is filled in, but not both and not neither.)

I want to perform client-side validation as well as server-side validation, which means either using remote validation or implementing duplicate validation code. I’m OK with either.

I’ve read a number of posts on rolling your own server-side model-level validation, but none that deal with also implementing client side validation. (I don’t know — I’m sure someone out there can tell me — whether model-level client-side validation is easy to set up with jQuery validation.)

I’ve also read about implementing your own remote validation from scratch, which I may have to do since the Remote attribute is property-level only.

I’ve read this question, which is identical to mine, but the only link that’s really on-point doesn’t seem to say what the answerer says it says.

So, my question: is there an easy, relatively low-effort way to implement server+client model-level validation, with or without a remote component? And is there a nice blog post or web page somewhere that explains this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:35:44+00:00Added an answer on May 26, 2026 at 5:35 pm

    There is a similar question answered here which may be of some help? The answer given is for validating that at least one field is entered but the principles given in the answer may be what you are looking for and you should be able to change the answer to suit the validation you require. The solution also offers both server and client side validation options and I believe you can use the solution as both module or property level validation?

    Additionally, there is also the following article here detailing how to create your own custom validation similar to that provided in the answer I linked to.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to store some data in a Django model. These data are not
Need some help from javascript gurus. I have one page where http://www.google.com/finance/converter is embedded
Need some help assigning a mouseover event to display some icons that start out
I need to model a very complex structure in Liferay, but don't see how
For my site I created an abstract Model which implements model-level read permissions. That
I have some content in a database, but now I need to add two
I need a modal dialog to gather some user input. I then need the
Need some help about with Memcache. I have created a class and want to
Need some help, please. I have a line of horizontal thumbnails loaded as ONE
Need some help to solve this. I have a gridview and inside the gridview

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.