jquery - Want to write Junit for the beow function -


validating input fields html form .trying write unit test case.need implement jasmine unit test case in jasmine

var object = {}; var myclass=function requiredfieldvalidator(jquery) {     object.utility = {         requiredfieldvalidation : function validation() {             jquery("#insertquestionandanswer").validate({                 rules : {                     question : "required",                     answer : "required",                 },                 messages : {                     question : "question cannot blank",                     answer : "answer cannot blank",                 },                 submithandler : function(form) {                     form.submit();                 }             });         }     }      jquery(document).ready(function() {         object.utility.requiredfieldvalidation();     }); }(jquery); 


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -