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
Post a Comment