Sha256: 9f3d2cdb612d8ff29b6307fbdb7cea426f5559a3069bc783128e3882ce0da17c
Contents?: true
Size: 534 Bytes
Versions: 59
Compression:
Stored size: 534 Bytes
Contents
var composed, presenceable, stampit, validations; validations = require('../validatable'); stampit = require('../../../vendor/stampit'); presenceable = stampit({ validate_each: function(record, attribute, value) { if (value === null || value === '' || value === void 0) { return record.errors.add(attribute, 'blank', this.options); } } }); composed = stampit.compose(validations.validatable, presenceable); composed.definition_key = 'validates_presence_of'; validations.manager.validators.presence = composed;
Version data entries
59 entries across 46 versions & 1 rubygems