==== Javascript plugins ==== === formvalidation.io === http://formvalidation.io/ * Notes * Field is not validated when value is changed programmatically: validate manually with ''revalidateField'' method. * ''$(form).formValidation('revalidateField', fieldName);'' * http://formvalidation.io/examples/field-value-changed-programmatically/ * Form is not reset if not visible: this causes issues with hidden modal * Solution: add resetForm to ''on('hide.bs.modal''' * $('#modalDetails').on('hide.bs.modal', function (event) { $("#modalForm").formValidation('resetForm', true); }); * See https://github.com/formvalidation/support/issues/144 * If validation added with HTML5 data-attributes, add additional validation with 'addField'. * Example: reizen3.krisphilippe.be/redirect/trip.php $('#modalForm-2').formValidation('addField', 'hotel_checkin', { validators: { remote: { url:'/ajax/getdata.php', data: function(validator, $field, value) { // validator is FormValidation instance, $field is the field element, value is the field value // Return an object return { hotel_checkout: $('input[name="hotel_checkout"]').val(), request: 'validate_hoteldates' } } } } }); * Date * is only checked if ''type="date"'' or ''data-fv-date="true"'' * default format = ''MM/DD/YYYY'', use ''data-fv-date-format="YYYY-MM-DD"'' * ''min='' and ''max='' is not supported (use ''data-fv-date-min='' and ''data-fv-date-max='') * See http://formvalidation.io/validators/date/ * Issues * Bug [[https://github.com/formvalidation/support/issues/|#724]]: jQuery 3.0 replaced jqXHR.success(), jqXHR.error() with jqXHR.done(), jqXHR.fail() * Fix: {{ :javascript:plugins:formvalidation.min.js.zip |}}