Skip to content

Conversation

@ragulka
Copy link

@ragulka ragulka commented Feb 27, 2014

This PR is a solution to #211. It allows pre-validating a set of attributes against itself or another set of attributes.

// 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.

@chiefGui
Copy link
Collaborator

chiefGui commented Jan 7, 2015

+1! @thedersen

@chiefGui chiefGui mentioned this pull request Jan 14, 2015
@dottodot
Copy link

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants