Skip to content

Input-Group invalid together #3

@rootedsoftware

Description

@rootedsoftware

I have an input-group for first and last name. When I use your sample code I get both first and last name fields colors changed to red if one of them is empty.

image

Here is the template.js file

Template.DonationForm.rendered = function () {
  $('.donation-form').bootstrapValidator({
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
            fname: {
                message: 'The name is not valid',
                validators: {
                    notEmpty: {
                        message: 'First name is mandatory'
                    }
                }
            },
            lname: {
                message: 'The name is not valid',
                validators: {
                    notEmpty: {
                        message: 'Last name is mandatory'
                    }
                }
            }
        }
    });
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions