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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:25:45+00:00 2026-06-12T07:25:45+00:00

So I’m using jQuery and the validation plugin to validate form input on the

  • 0

So I’m using jQuery and the validation plugin to validate form input on the client side. Of course I need to revalidate it on the server. I want to statically put the errors tags into the HTML for all form items. So even if there’s no error they’ll still be there. I want to do this so that the jQuery validation and PHP can both output to the same tags.

Now my question is this – How can I force the validation plugin to output to the existing tag? Is it possible and if not, how could I accomplish what I want? Surely this is a pretty common thing to want to do, and yet I haven’t been able to find any answers (maybe I just don’t know what to search for).

Here’s a little example of what I’m after.

<li>
   <label for="description" class='form_desc'>Description</label>
   <textarea name="description" id='description' class='required' title="A description of your listing." rows="15" ></textarea>
   <label for='description' class='error'>This is the tag I want to use.</label>
</li>
  • 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-12T07:25:46+00:00Added an answer on June 12, 2026 at 7:25 am

    If I understand your question correctly you can use the jquery validation. It’s easier to use. Take a look at the below code.

            jQuery("#description").validate({
                expression: "if(VAL) return true; else return false;",
                message: "<?php echo JText::_('DESC_ERROR_BLANK'); ?>"
            });
    

    At the server level(PHP) you can define the DESC_ERROR_BLANK like below.

    define("DESC_ERROR_BLANK", "This is the tag I want to use");
    

    At the server level

    If($_POST['description'] == '')
    {
     //php validation goes here
     //use the same 'DESC_ERROR_BLANK' to output the error here
    }
    

    Hope this will solve your problem. If you have any questions please don’t hesitate to ask. Thanks.

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

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I have thousands of HTML files to process using Groovy/Java and I need to
I need to clean up various Word 'smart' characters in user input, including but
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.