Try this:

 <script type="text/javascript">
         $(document).ready(function() {
                 $("#autoSumForm").validate({
                         rules: {
                                 p1001: {number: true},
                                 p1002: {number: true}
                         },
                         messages: {
                                 p1001: "",
                                 p1002: ""
                         },
                         submitHandler: function(form) {
                                 jQuery(form).ajaxSubmit();
                         }
                 });
         });
 </script>

On Jan 13, 12:03 am, Seth <seth.wilsch...@gmail.com> wrote:
> Hello,
>
> I'm using jquery with the form and validation plugins. I have this:
>
> <script type="text/javascript">
>         $(document).ready(function() {
>                 $("#autoSumForm").validate({
>                         rules: {
>                                 p1001: {number: true},
>                                 p1002: {number: true}
>                         },
>                         messages: {
>                                 p1001: "",
>                                 p1002: ""
>                         }
>                 });
>
>                 $('#autoSumForm').ajaxForm(function() {
>                         alert("Time submitted.");
>                 });
>         });
> </script>
>
> The validation and the form submit both work, but the form submits
> even if not valid. How do I combine the two?
>
> Thanks.

Reply via email to