Sha256: 79b3379a8f9f19a96ec705a8004d31d02c0e53aff0da85ab0574dba764745a45

Contents?: true

Size: 342 Bytes

Versions: 2

Compression:

Stored size: 342 Bytes

Contents

module ActiveRecord
  module StrictValidations
    class Validation
      class TextValidation < Validation
        LIMIT = 65535

        def apply
          model.validates field.name, 'ActiveRecord::StrictValidations::Validator::StrictLength' => { in: 0..(field.limit || LIMIT) }, allow_blank: true
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activerecord_strict_validations-0.3.1 lib/active_record/strict_validations/validation/text_validation.rb
activerecord_strict_validations-0.3 lib/active_record/strict_validations/validation/text_validation.rb