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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:18:33+00:00 2026-05-23T01:18:33+00:00

What I would Like I would like to trigger client-side validation in my View

  • 0

What I would Like

I would like to trigger client-side validation in my View with an event of my choice. It could be ‘onblur’ maybe another button but something other than the submit button.

Relevant Links

How to trigger validation without using a submit button

Applying unobtrusive jquery validation to dynamic content in ASP.Net MVC

What I’ve tried

Given a various event listener, I’ve fired the following methods with no luck:

$(selector).validate();

$(selector).valid();

$.validator.unobtrusive.parseDynamicContent(selector);

$.validator.unobtrusive.parse($(selector));

Summary

So I need client-side validation to fire on a given event (other than on submit) and show the corresponding validation messages. I dont feel like any of the Markup/Razor syntax is necessary as client-validation fires on submit and all the corresponding validation messages show as expected.

  • 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-23T01:18:34+00:00Added an answer on May 23, 2026 at 1:18 am

    $('form').valid() should work. Let’s exemplify.

    Model:

    public class MyViewModel
    {
        [Required]
        public string Foo { get; set; }
    }
    

    Controller:

    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View(new MyViewModel());
        }
    }
    

    View:

    @model MyViewModel
    
    <script src="@Url.Content("~/Scripts/jquery.validate.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")" type="text/javascript"></script>
    
    @using (Html.BeginForm())
    {
        @Html.LabelFor(x => x.Foo)
        @Html.EditorFor(x => x.Foo)
        @Html.ValidationMessageFor(x => x.Foo)
    }
    
    <div id="validate">Hover here to trigger validation</div>
    
    <script type="text/javascript">
        $('#validate').hover(function () {
            $('form').valid();
        });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create a small Windows Messenger Client that I can trigger
I have a custom event I've made which I would like to trigger at
I would like my server side PHP validation on a log in page to
Lets say I would like to trigger a custom event, something like: var foo
I would like links to be trigger on double click. Something simple like this:
I would like to have a Maven goal trigger the execution of a java
Using the Northwind sample: I would like to create an insert trigger on the
I have this piece of logic I would like to implement as a trigger,
I have a form that is using jQuery Validate plugin for client side validation,
I have a mixed client-side/server-side validation using jQuery validation plugin. The validation happens on

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.