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 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

Ask A Question

Stats

  • Questions 188k
  • Answers 188k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can find out the actual pixel height and width… May 12, 2026 at 5:31 pm
  • Editorial Team
    Editorial Team added an answer Take the link element and disable it document.getElementsByTagName('link')[0].disabled = true; May 12, 2026 at 5:31 pm
  • Editorial Team
    Editorial Team added an answer This is how we do it: protected virtual void ExecuteScript(SqlConnection… May 12, 2026 at 5:31 pm

Related Questions

I am using JQuery Validation plugin and have a question about validation. If I
I am using the jQuery Validation plugin and have an issue validating items that
I am using the JQuery Form Plugin , the JQuery validation plugin and the
I have a form that works in 'sections' that I will refer to as

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.