batmanjs/batman — pull request #883 by RichardBlair (2013-11-05 20:24:07+00:00)
Title: Conditional validators

### Problem
Currently if you have a heavily validated model, there is a good chance you have to use functions because there are conditions around whether or not you want to run that particular validator.

### Solution
Allow a function to be passed through the option ```if``` to the ```@validate``` method, which will be run when the model is validated. If the function passed through the ```if```` option returns true, then the validator will be run otherwise it will be skipped.

@nickjs & @hornairs