instance method
_validates_default_keys
Ruby on Rails 6.1.7.10
Since v3.1.12 PrivateSignature
_validates_default_keys()
When creating custom validators, it might be useful to be able to specify additional default keys. This can be done by overwriting this method.
Source
# File activemodel/lib/active_model/validations/validates.rb, line 157
def _validates_default_keys
[:if, :unless, :on, :allow_blank, :allow_nil, :strict]
end
Defined in activemodel/lib/active_model/validations/validates.rb line 157
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Validations::ClassMethods