thedersen/backbone.validation — pull request #212 by ragulka (2014-02-27 15:52:45+00:00)
Title: Allow pre-validating against itself or another set of attributes

This PR is a solution to https://github.com/thedersen/backbone.validation/issues/211. It allows pre-validating a set of attributes against itself or another set of attributes.

```javascript
// Validate a hash of attributes against itself
// Pass in either `true` or an attribute hash as the 2nd parameter.
// Neither of the examples below will result in any errors.
var errors = model.preValidate({ password: 'value', passwordConfirmation: 'value' }, true);
var errors = model.preValidate({ password: 'value' }, { passwordConfirmation: 'value' });
```

Note: I did write the tests, but since `npm install buster` failed, I couldn't actually run them.