Module: Sequel::Plugins::ValidationClassMethods

Module | Sequel::Plugins::ValidationClassMethods
In: | lib/sequel/plugins/validation_class_methods.rb

Sequel‘s built-in validation_class_methods plugin adds backwards compatibility for the legacy class-level validation methods (e.g. validates_presence_of :column).

It is recommended to use the validation_helpers plugin instead of this one, as it is less complex and more flexible.

### Methods

apply

### Classes and Modules

Module Sequel::Plugins::ValidationClassMethods::ClassMethods
Module Sequel::Plugins::ValidationClassMethods::InstanceMethods

### Public Class methods

apply(model)

Setup the validations hash for the given model.

[Source]

        # File lib/sequel/plugins/validation_class_methods.rb, line 12
    12:       def self.apply(model)
    13:         model.class_eval do
    14:           @validation_mutex = Mutex.new
    15:           @validations = {}
    16:         end
    17:       end

[Validate]