Sangamesh Rajur
Sangamesh Rajur

Reputation: 11

checkbox validation for sign up page using bootstrapvalidator

How to validate checkbox which has value "I agree to the terms and conditions" in the sign-up page using bootstrapvalidator plugin.If the checkbox is not checked appropriate message should be displayed.

Upvotes: 1

Views: 2403

Answers (2)

Leonel Atencio
Leonel Atencio

Reputation: 474

You can do that easily with jquery. (Wich you should have included if using Bootstrap).

if($("#checkbox").is(':checked')) {  
    alert("Welcome");  
} else {  
    alert("You must agree to the ToS");  
}  

Here's more on that: http://api.jquery.com/checked-selector/

Upvotes: 1

Savan Kachhiya Patel
Savan Kachhiya Patel

Reputation: 1084

Refer this link Bootstrap Validation and Fire validation on submit button.

Upvotes: 0

Related Questions