Código HTML:
<form action="#" method="post"> ///////////////////////FORMULARIO </form> <script type="text/javascript"> var field1 = new LiveValidation( 'field1', {onlyOnSubmit: true } ); field1.add( Validate.Email ); var field2 = new LiveValidation( 'field2', {onlyOnSubmit: true } ); field2.add( Validate.Acceptance ); var field3 = new LiveValidation( 'field3', {onlyOnSubmit: true } ); field3.add( Validate.Presence ); var automaticOnSubmit = field1.form.onsubmit; field1.form.onsubmit = function(){ var valid = automaticOnSubmit(); if(valid)alert('The form is valid!'); return false; } </script>
Un saludo y gracias por su lectura.