I am using ember-cp-validation in ember js application for validation. I want to validate checkbox, selectbox and radiobutton.I can't find any sample code to validate these controls.
Can anybody give any ideas/sample on how to validate checkbox, selectbox and radiobutton using ember-cp-validation plugin.
ember-cp-validationsvalidates the value of variables (whether on a model, controller, etc). As long as the checkbox is bound to a variable of the same name as specified in the validator, it should work regardless of widget type. (whether the value is connected via 2-way binding or changed when an action fires)See here: http://offirgolan.github.io/ember-cp-validations/docs/modules/Basic.html#objects
So, a pseudocode example... First define the validations in your controller...
And in your template, bind the value of the checkbox to the value: