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 8896887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:11:33+00:00 2026-06-15T00:11:33+00:00

I got many [Required] fields in my model. And, in traditional MVC way, I

  • 0

I got many [Required] fields in my model.

And, in traditional MVC way, I will add @Html.ValidationMessageFor() for each required textbox.

Then, if user doesn’t type anything for 5 textboxes, 5 message will show up in the UI.

My question is: can I show just one message saying Please fill mandatory fields in the UI instead of showing the message everywhere like Name is required, Address is required…?

and I need this to be validate on Client Side, without post form back to server

  • 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-06-15T00:11:34+00:00Added an answer on June 15, 2026 at 12:11 am

    You might want to look at ValidationSummary – http://msdn.microsoft.com/en-us/library/system.web.mvc.html.validationextensions.validationsummary(v=vs.108).aspx – Returns an unordered list (ul element) of validation messages that are in the ModelStateDictionary object. You can override the message like so:

    @Html.ValidationSummary(true, "Invalid form")
    

    Source https://stackoverflow.com/a/4924494/201648

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

Sidebar

Related Questions

In many tutorial of Acl component in cakephp i got instruction that add component
I've got 2 fields to populate: how many times the page is called per
I've got a model element like so: [Required] [Display(Name = First name)] [StringLength(50)] public
I've got many rows of racing lap times stored in Excel in the following
I have got many errors while installing shotdetect software. some errors were because of
I've been looking around quite a bit to solve my issue. I got many
I've got a many to many relationship from Project to Asset using ProjectAsset class
When compiling the following instruction: movl 4(%ebp), 8(%ebp) I got: too many memory reference
After many hair-pulling frustrations I've finally got one version of the PerlMagick module working
I've got a big solution with many projects in it. So when it builds

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.