jquery - bootstrapvalidator Uncaught TypeError: Cannot read property 'group' of undefined -
i have same issue described here: bootstrapvalidator gives "cannot read property 'group' of undefined" on ckeditor field, except not related ckeditor. validation code taken here: http://formvalidation.io/validators/identical/ here jquery code:
$('form').bootstrapvalidator({ framework: 'bootstrap', feedbackicons: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, fields: { password2: { validators: { stringlength: { min: 6, max: 10, message: 'field must 6 10 characters long' }, identical: { field: 'password1', message: 'the password , confirm not same' } } } } }); and here html:
<div class="form-group"> <label class="col-sm-2 control-label">password</label> <div class="col-sm-10"> <input type="password" name="password1" class="form-control"> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label">repeat password</label> <div class="col-sm-10"> <input type="password" name="password2" class="form-control"> </div> </div> i'm stack here. please help!
ok, doubleread documentation. apparently way using validator wrong because documentation newer (paid) version have older free version of bootstrapvalidator. syntax of validator in old version different:
password1: { validators: { stringlength: { min: 6, max: 10, message: 'field must 6 10 characters long' }, identical: { field: 'password2', message: 'the password , confirm not same' } } }, password2: { validators: { identical: { field: 'password1', message: 'the password , confirm not same' } } } so, script must include both checked fields.
Comments
Post a Comment