Sha256: 4adb38a952d92f311988ebb1005233f7121ab85933fa8d618e66596673b4494e

Contents?: true

Size: 596 Bytes

Versions: 36

Compression:

Stored size: 596 Bytes

Contents

var composed, confirmationable, stampit, validations;

validations = require('../validatable');

stampit = require('../../../vendor/stampit');

confirmationable = stampit({
  validate_each: function(record, attribute, value) {
    if (record[attribute] !== record["" + attribute + "_confirmation"]) {
      return record.errors.add("" + attribute + "_confirmation", 'confirmation', this.options);
    }
  }
});

composed = stampit.compose(validations.validatable, confirmationable);

composed.definition_key = 'validates_confirmation_of';

validations.manager.validators.confirmation = composed;

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
ende-0.3.13 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.3.12 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.3.11 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.3.10 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.3.9 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.3.8 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.3.7 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.3.6 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.3.5 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.3.4 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.3.3 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.3.2 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.3.1 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.3.0 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.2.21 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.2.20 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.2.19 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.2.18 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.2.17 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js
ende-0.2.16 vendor/components/indefinido-indemma/lib/record/validations/confirmation.js