<p>How do you create a simple, custom rule using the jQuery Validate plugin (using <a href="http://jqueryvalidation.org/jQuery.validator.addMethod" rel="noreferrer"><code>addMethod</code></a>) that doesn't use a regex?</p>

<p>For example, what function would create a rule that validates only if at least one of a group of checkboxes is checked?</p>

You can create a simple rule by doing something like this:
```
```
jQuery.validator.addMethod("greaterThanZero", function(value, element) {
    return this.optional(element) || (parseFloat(value) > 0);
}, "* Amount must be greater than zero");
```
```
And then applying this like so:
```
```
$('validatorElement').validate({
    rules : {
        amount : { greaterThanZero : true }
    }
});
```
```
Just change the contents of the 'addMethod' to validate your checkboxes.