You need to run that validation on submit, too. If you don't need
remote validation, you can still use the validation plugin and
implement the logic you have as a custom method:
http://docs.jquery.com/Plugins/Validation/Validator/addMethod#namemethodmessage

Jörn

On Wed, May 7, 2008 at 8:07 PM, jpl80 <[EMAIL PROTECTED]> wrote:
>
>
>  I figured it out... mostly:
>
>         $(document).ready(function() {
>                 $("div.instock input.order-qty").keyup(function(){
>                         var x = parseInt($(this).val());
>                         var y = 
> parseInt($(this).siblings("span.qty").attr("title"));
>                         if (x > y) {
>                                 $(this).siblings("span.error").text("Not 
> enough in stock");
>                         } else {
>                                 $(this).siblings("span.error").text("");
>                         }
>                 });
>
>         });
>
>  however, it still allows the user to submit the form. How do I stop them
>  from being able to submit the for if the quantity they ordered is over the
>  limit?
>
>  --
>  View this message in context: 
> http://www.nabble.com/validating-dynamically-generated-data-tp17091060s27240p17111078.html
>
>
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>

Reply via email to