Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#defaultForm').bootstrapValidator({
- live: 'enable',
- submitted: 'enable',
- message: 'This value is not valid',
- fields: {
- brand_name: {
- validators: {
- notEmpty: {
- message: 'The brand name is required and cannot be empty'
- }
- }
- },
- brand_slug: {
- validators: {
- notEmpty: {
- message: 'The brand slug is required and cannot be empty'
- }
- }
- }
- }
- });
- // Validate the form manually
- $('#validateBtn').click(function() {
- $('#defaultForm').bootstrapValidator('validate');
- });
- $('#resetBtn').click(function() {
- $('#defaultForm').data('bootstrapValidator').resetForm(true);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement