Sha256: 9b15e703d030ba15c0790eb2033ff7f0d58cb527fdbb6892462adf2683311038
Contents?: true
Size: 656 Bytes
Versions: 30
Compression:
Stored size: 656 Bytes
Contents
# TODO Add base settings to validation # model = window.model # TODO implement method # model[resource].validators_on 'field' # Get all validators related to this field validations = require '../validatable' stampit = require '../../../vendor/stampit' confirmationable = stampit validate_each: (record, attribute, value) -> if record[attribute] != record["#{attribute}_confirmation"] record.errors.add "#{attribute}_confirmation", 'confirmation', @options composed = stampit.compose(validations.validatable, confirmationable) composed.definition_key = 'validates_confirmation_of' validations.manager.validators.confirmation = composed
Version data entries
30 entries across 30 versions & 1 rubygems