Sha256: ceadd1d84f07579aaffc1256b091fa9388402c0802d9db7e6b6f6e8c1c7bb67a
Contents?: true
Size: 405 Bytes
Versions: 8
Compression:
Stored size: 405 Bytes
Contents
module Shamu module Attributes module Validators # Validates that an attribute's value returns true for `valid?`. # # validates :nested_request, valid: true class ValidValidator < ActiveModel::EachValidator def validate_each( record, attribute, value ) record.errors.add attribute, :invalid if value && !value.valid? end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems