I wanna create a form in js file.
var form = '<form id="formForgetPass" action="#" method="POST" class="form-horizontal"><div class="form-group" style="margin-bottom: 0px !important;"><label for="textfield" class="control-label col-sm-2">E-posta</label><div class="col-sm-10"><input type="text" id="forgetEmail" name="email" class="form-control" /></div></div></form>';
And I'm using JquerValidation
Is it possible that I could control form inputs at run-time? I haven't figured out that.
It did not work properly as below
$("#formForgetPass").validate({
rules: {
email: {
required: true,
email: true
}
}
});