I am using the BootstrapValidator plugin to validate a form, however I have the following problem if the user has any of them I do not even enter, so I have a "phone" area and a "mobile" field, I want to launch a custom message (you need to inform a phone number), and if it informs anyone (Phone or mobile) verification will be satisfied.
There is a doubt: Is it possible to use conditional within bootstrap validation?
It starts working for a lot of people
$ ('Form'). Validate ({rule: {phone: {required: true}, mobile: {AddClass ('has-error');}, unhighlight: function (element) is {$ (element): (element)}, highlight: function (Element) .closest ('form-group' .clostest ('form-group'). RemoveClass ('is-error');}, error element: 'span', error class: 'help -block ', error placement: function (error, element) {if (element.parent (' input-group '). Length) {error.ins ertAfter (element.parent ());} and {error.insertAfter ( Element);}}});
and html:
Comments
Post a Comment