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

  • Home
  • SEARCH
  • 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 334113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:01:27+00:00 2026-05-12T10:01:27+00:00

I am using jquery validation plugin and zend framework. I have my form in

  • 0

I am using jquery validation plugin and zend framework. I have my form in a table. I am displaying an image as an error when a textfield is not validated. The error image is displayed very next to textbox in the same td of table. But I want to show error message/image in next td of same tr.

For example this is before submit:

<table><tr><td>First Name</td><td><input type="text" class="required" /></td><td></td></tr></table>

I want this after submit with empty field:

<table><tr><td>First Name</td><td><input type="text" class="required" /></td><td><img id='exclamation' src='images/exclamation.gif' title='This field is required.' /></td></tr></table>

I am using this js function for now:

$(obj).find("input.required").each(function(){
      $(this).rules("add", {
            required: true,
            minlength: 2,

            messages: {

                    required : "<img id='exclamation' src='images/exclamation.gif' title='This field is required.' />",
                    minlength: "<img id='exclamation' src='images/exclamation.gif' title='At least 2 characters.' />"

            }
      });
});
  • 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-12T10:01:27+00:00Added an answer on May 12, 2026 at 10:01 am

    After a time I got my answer. Infact I want to display an image with a callout(containing error) in next column(td) of input field that is not validated by validation plugin. And when an input field is validated, this error image should be removed with its callout on it.

    Here is my solution.

    $("form").validate({
    
        errorPlacement: function(error, element) {
    
            //There should be an error
            if(error.html() != ''){         
    
                element.parent().next().html("<img id='exclamation' src='images/exclamation.gif' />").callout({
                    width       : 200,
                    cornerRadius    : 8,
                    className   : "validationCallout",
                    content     : error,
                    align       : "left",
                    nudgeHorizontal : -14,
                    nudgeVertical   : 4,
                    arrowHeight : 6
                });     
            }
        },
    
        success: function( label ) {
            $(obj).find(".valid").parent().next().html("");         //remove error image from next column(td) of input containing "valid" class
            $(obj).find(".valid").parent().next().closeCallout();   //remove callout on error image from next column(td) of input containing "valid" class
        }
    
    });
    

    This code may be complex but it is working for me now. A callout plugin is used here that is not related to the question but may help anyother.
    Can anyone make it more simple?

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

Sidebar

Related Questions

I am using the jQuery form validation plugin. The problem I have is that
I have a mixed client-side/server-side validation using jQuery validation plugin. The validation happens on
I am using the Validation jQuery plugin to do some validation. I have a
I am using jquery validation plugin for validation empty forms. Should I also check
I am using the jQuery validation plugin and I would like to validate a
I'm using the ajaxform jQuery plugin to create ajaxed HTML forms and want to
first a little bit of documentation from the jQuery validation plugin: Use submitHandler to
I have a multiple selection list which have more than 5 options. But i
I have a SVG map of a city that when clicked, creates hidden elements
I'm running into a strange issue in WebKit browsers, where the email field 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.