Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

95
Views
JQuery Validator dos excavaciones

Quiero validar dos tipos de entrada en mi sitio. El segundo campo debe ser menor que el primero. De lo contrario, se debe activar un addClass para un mensaje. addClass.Message .show_the_massage Los ID y los nombres son fijos y no se pueden cambiar.

html:

 <div class="wapf-section"> <form id="sample"> <input type="text" name="wapf[field_6169527c6979a]" id="6169527c6979a" value=""> <input type="text" name="wapf[field_616ebcec0c389]" id="616ebcec0c389" value=""> <br/> </form> <div>

JQuery:

 jQuery(document).ready(function ($) { $.validator.addMethod('lessthenother', function (value, element, param) { return this.optional(element) || parseInt(value) <= parseInt($(param).val()); }, 'Invalid value'); $('.wapf-section').validate({ errorElement: "small", rules: { bid_auto_decrement: { lessthenother: '6169527c6979a' } }, messages: { wapf[field_616ebcec0c389]: { lessthenother: 'Must be less than bid price.' } } }); $('[name="wapf[field_6169527c6979a]"]').on('change blur keyup', function() { $('[name="wapf[field_616ebcec0c389]"]').valid(); }); });
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!