The columns with automatic not_null validations for columns present in the values.
The columns or sets of columns with automatic max_length validations, as an array of pairs, with the first entry being the column name and second entry being the maximum length.
The columns with automatic not_null validations
Inherited options
The columns or sets of columns with automatic unique validations
Whether to use a presence validation for not null columns
# File lib/sequel/plugins/auto_validations.rb, line 121 def auto_validate_presence? @auto_validate_presence end
Whether to automatically validate schema types for all columns
# File lib/sequel/plugins/auto_validations.rb, line 126 def auto_validate_types? @auto_validate_types end
Freeze auto_validation settings when freezing model class.
# File lib/sequel/plugins/auto_validations.rb, line 131 def freeze @auto_validate_not_null_columns.freeze @auto_validate_explicit_not_null_columns.freeze @auto_validate_max_length_columns.freeze @auto_validate_unique_columns.freeze super end
Skip automatic validations for the given validation type (:not_null, :types, :unique). If :all is given as the type, skip all auto validations.
# File lib/sequel/plugins/auto_validations.rb, line 142 def skip_auto_validations(type) if type == :all [:not_null, :types, :unique, :max_length].each{|v| skip_auto_validations(v)} elsif type == :types @auto_validate_types = false else send("auto_validate_#{type}_columns").clear end end