Skip to content

cant validate using Event #604

@davidkurniawan1980

Description

@davidkurniawan1980

whats wrong with my code, thanks for any suggest

<script>
$.validate({
	form:'#formSemester',
	validateOnEvent:true
});

var errors = [],

// Validation configuration
conf = {
  onElementValidate : function(valid, $el, $form, errorMess) {
     if( !valid ) {
      // gather up the failed validations
      errors.push({el: $el, error: errorMess});
     }
  }
},
lang = 'en'
;


$.formUtils.loadModules('security, date');
	
$('#Ctombol').on('click', function() {
   // reset error array
   errors = [];
   if( !$(this).isValid(lang, conf, false) ) {
    displayErrors(errors);
   } else {
   // The form is valid
   $('#konfirS').modal('show');
   }
});

</script>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions