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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:46:40+00:00 2026-05-28T20:46:40+00:00

Hey I tried to outsource my error messages into a xml-File, so changing them

  • 0

Hey I tried to outsource my error messages into a xml-File, so changing them or adding some new messages for new elements gets easier.

My xml-file looks like this:

   <messages>
      <element>
        <name>name</name>
        <pflicht>Text bei Pflicht.</pflicht>
        <format>email</format>
        <formattext>Text bei falschem Format</formattext>
      </element>
      <element>
        <name>postleitzahl</name>
        <pflicht>Required</pflicht>
        <format>plz</format>
        <formattext>Bitte Postleitzahl angeben.</formattext>
      </element>
   </messages>

And the resulting function should be written for each element-tag and look like this:
For example:

  jQuery(".validation").rules("add",{
        messages:{
            name :{
                required: "Text bei Pflicht",
                email: "Text bei falschem Format"
            }
            postleitzahl:{
                required: "Required.",
                plz: "Bitte Postleitzahl angeben."
            }
  });

How can I achieve that?

Thanks in advance.

  • 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-28T20:46:41+00:00Added an answer on May 28, 2026 at 8:46 pm
    var myXML;
        $.ajax({
            type: "GET",
            url: "message.xml",
            dataType: "xml",
            success: function(xml) {
                alert($(xml).find('element'));
                }
            });
    
        var nm = returnValue("name");
        var frm = returnValue("format");
        jQuery(".validation").rules("add",{
            messages:{
               nm:{
                   required: returnValue("pflicht"),
                   frm : returnValue("formattext")
                }
            }
        })
    
        function returnValue(_tag){
           return myXML.find(_tag).text();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey, So I am new to Android and tried to implement a class that
Hey guys, sorry I am new to Jquery. I have always tried to do
Hey guys, I got this error message when I tried to trigger the function
Hey, I've tried to update jQuery to its latest version on a system I'm
Hey right now I'm using jQuery and I have some global variables to hold
Hey, I've tried researching how to POST data from java, and nothing seems to
hey guys how to make these php html links codes possible. i have tried
Hey, guys, I tried to ask this yesterday but I didn't explain myself clearly
Hey. I have a tabcontrol that is bound to an observable collection. I've tried
hey i made a lot of search and found some similar types of code.

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.