instance method
validators_on
Ruby on Rails 3.0.20
Since v3.0.20Signature
validators_on(attribute)
List all validators that being used to validate a specific attribute.
Parameters
-
attributereq
Source
# File activemodel/lib/active_model/validations.rb, line 151
def validators_on(attribute)
_validators[attribute.to_sym]
end
Defined in activemodel/lib/active_model/validations.rb line 151
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Validations::ClassMethods