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