jQuery Validate plugin break my form -


enter image description here

i have issue on form jquery validate plugin, when press save entry, shows error message breaks form. how fix please?

at time have this:

    $(document).ready(function () {     $('form').validate({ // initialize plugin         rules: {             loyalty_card: {                 required: true             },             description: {                 required: true             },             amount: {                 required: true,                 number: true             },             transaction_type: {                 required: true             }         },         submithandler: function (form) {             //alert('valid form submitted');             //return false;         }     }); }); 

you can including errorplacement event hook, , place text before radio button opposed directly after it

errorplacement: function (error, element){    if(  element.attr("name") == "transaction_type" ){        error.insertbefore(element);    }else{        error.insertafter(element);    } }   

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -