class method
self.kind
Ruby on Rails 5.1.7
Since v3.0.20Signature
self.kind()
Returns the kind of the validator.
PresenceValidator.kind # => :presence
UniquenessValidator.kind # => :uniqueness
Source
# File activemodel/lib/active_model/validator.rb, line 101
def self.kind
@kind ||= name.split("::").last.underscore.chomp("_validator").to_sym unless anonymous?
end
Defined in activemodel/lib/active_model/validator.rb line 101
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Validator