I am using bootstap validator library for form validation.
//validate when submit button is clicked.
$('#passenger-form').bootstrapValidator({
fields: {
email: {
group: '.col-xs-6',
validators: {
notEmpty: {
message: 'Email required'
}
}
}
//rest of the rules here
}
});
Sometime my form is dynamically added (based on some conditions made by the user) and at that time validation does not work.
When the form is dynamically added the validation rules are not working.
I know jquery.on
event can be used to solve this issue, but how can I use it in my case?