A quick example of some automagic goodness…
Let’s say we need to to build an “add Post” form and allow the user to pick some tags for the Post.
In a few simple words: use the ‘comparison’ rule to validate a checkbox.
To give you an example, let’s say a user needs to agree to the terms of service when registering a new account. In your User model you setup a rule for the checkbox as…
One question that I’ve seen come up a few times is: “How do I handle multiple checkboxes in a form?”The only trick here is the way you name your checkbox form element. Let’s consider an example where you’d like to select multiple messages (by using checkboxes) and then delete these messages…