This is the first time I use bootstrap for validate a form fields, I'm learning how to do it by following a
contact form validation example
in the following link.
Fortunately after some time, I've got the example in the link provided, running perfectly.
Now I wonder how can I validate a "name" field for containing only letters.
Based on the validators:{}
object in the code snippet below...
$(document).ready(function(){
$('#form_id').bootstrapValidator({
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields:{
first_name:{
validators:{
stringLength: {
min: 2,
},
notEmpty: {
message: 'Please supply your first name'
}
}
}
}
})
});
is there something similar in bootstrap that allows to make such validation?