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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:10:14+00:00 2026-06-06T00:10:14+00:00

I have used the method described here to localize my data annotation messages and

  • 0

I have used the method described here to localize my data annotation messages and basically it is working fine in normal form posts. I can see the localized validation message on client side as well.

However, problem occurs when I have a partial view that has the input fields to be validated and is loaded using an ajax call. For some reason, I get the default validation message (“This field is required”) instead of my localized message that is set in data-val-required attribute of the element.

I have verified the following:
1. I have included both “jquery.validate.min.js” and “jquery.validate.unobtrusive.min.js”.
2. I checked the ajax response and it does contain data-val-required attribute with localized message.

I have already tried the following solutions:
1. I tried parsing the ajax response (that didn’t work) as $.validator.unobtrusive.parse(‘form’)
2. Parsing dynamic content for validation as described here. Still no solution.

I have a pressing deadline and this is troubling me.

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

    I think you already tried this: stackoverflow.com/questions/4406291/jquery-validate-unobtrusive-not-working-with-dynamic-injected-elements – the answer by Steve Lamb helped me the most.

    Basically, you need to re-initialize the validator whenever you change the page content, as the validation code builds a list to track the controls it needs to validate only once, on page load…

    I also seemed to have to add some extra code to go through and make sure the inputs were named correctly. Give me a moment and I’ll dig the code up. – hmm, sorry, that code was part of a client app, and I can’t post it. Not too sure it would have made a difference anyway…

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

Sidebar

Related Questions

I have written a login form, in this I have used, form and method
Excuse my limited knoweldge here. In the past I have used Steve Sanderson's method
I have the following method (used to generate friendly error messages in unit tests):
I am trying to use the ReadUsingPointer Method described here to have a light
I followed the simple method described here and have a DataGrid with dynamically generated
I have a problem when call applet method from javascript.. I used this function
Following code create that Annotation. As described here, http://engineering.webengage.com/2012/03/12/a-peek-into-webengages-security-layer-super-cool-use-of-java-annotations /** * Defining the Asynch
Here is what I am trying to do: I have implemented Form Authentication in
I have web service urls that were working fine and are now returning the
I have some methods that are used by several classes. My idea was to

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.