This is the start check code
addFile according to the conditions. ApprovalMemo is the name value of the input, and removeFile is used for removal.
function initValidate() { $('#detailform').bootstrapValidator({ feedbackIcons : { valid : 'glyphicon glyphicon-ok', invalid : 'glyphicon glyphicon-remove', validating : 'glyphicon glyphicon-refresh' }, fields : { txPassword : { validators : { notEmpty : { message : 'The transaction password cannot be empty' }, notSameAndContinuity : { message : 'The password must be 6 different, non-consecutive numbers' } } } } }); };Sometimes we need to add or remove
addFile according to the conditions. ApprovalMemo is the name value of the input, and removeFile is used for removal.
$("#detailform").bootstrapValidator("addField", "approvalMemo", { validators: { notEmpty : { message : 'Approval comments cannot be empty' } } }); $("#detailform").bootstrapValidator('removeField','approvalMemo');