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

The Archive Base Latest Questions

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

I have the following code: <form id=reg_form_pay class=fancy_form action= method=POST> <div class=wrap_input style=margin-bottom: 10px;>

  • 0

I have the following code:

<form id="reg_form_pay" class="fancy_form" action="" method="POST">
  <div class="wrap_input" style="margin-bottom: 10px;">
    <p class="inp_label">Firstname:</p>
    <i> </i>
    <input id="pay_firstname" type="text" value="" name="FirstName" style="width: 157px;">
  </div>
  <div class="wrap_input" style="margin-bottom: 10px;">
    <p class="inp_label">Surname:</p>
    <i> </i>
    <input id="pay_lastname" type="text" value="" name="Surname" style="width: 157px;">
  </div>
  <div class="wrap_input" style="margin-bottom: 10px; margin-top: 34px;">
    <p class="inp_label">E-mail:</p>
    <i> </i>
    <input id="pay_email" type="text" value="" name="Email" style="width: 157px;">
  </div>
  <div class="wrap_input" style="margin-top: 34px;">
    <p class="inp_label">Phone:</p>
    <i> </i>
    <input id="pay_phone" type="text" value="" name="PhoneNumber" style="width: 157px;">
  </div>
</form>

And validation:

$("#reg_form_pay").validate({
            rules: {
                Email: { required: true, email: true, checkEmail: true },
                PhoneNumber: { required: true, checkPhoneNumber: true },
                FirstName: { required: true },
                Surname: { required: true }
            }, 
        });

By default, validator write label when validation is false. I dont’t want add element with error description. I want to add class error to parent div with class wrap_input. How can I say to validator to do this?
Thanks.

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

    Adding this to the options sent to validate would work:

    showErrors: function(errorMap, errorList) {
        $.each(errorList,function(i,e){
            $(e.element).parents('.wrap_input').addClass('error');
        });                   
    }
    

    Live example: http://jsfiddle.net/nqp8J/

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

Sidebar

Related Questions

I have the following code: <div id=header> <h1>HEADER TEXT</h1> <div id=members> <form action= method=post>
I have the following code: index.jsp: <form name=f action=db/ajoutConducteur.jsp method=post> <input type=text pattern=\d{8} required
I have the following code (inherited from someone): <div class=feedback>&nbsp;</div> <form onsubmit=return false autocomplete=off>
I have following html form: <form method=post action=> <input type=hidden name=userid id=user value=<?php echo
I have the following code submitting a form <div class=free-download> <input name=method_free value=<TMPL_VAR lang_free_download>
I have the following code: def bootstrap_form_field(f, method, text, &block) content_tag :div, :class =>
I have the following form code: # forms.py class SomeForm(forms.Form): hello = forms.CharField(max_length=40) world
I have following code in a html form <select name=category class=input onchange=ShowTB(this,'suggest');> <option value=0
I have the following code in a form's submit button onClickListener: String action, user,
I have following code: div.accountPage div.acct-form.login div.acct-header Log-in form.loginForm.login input(id=username, type=text, name=User, placeholder=Username, value=)

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.