Class: NxtSchema::Validators::Validator
- Inherits:
-
Object
- Object
- NxtSchema::Validators::Validator
show all
- Defined in:
- lib/nxt_schema/validators/validator.rb
Direct Known Subclasses
Attribute, Equality, Excluded, Excludes, GreaterThan, GreaterThanOrEqual, Included, Includes, LessThan, LessThanOrEqual, OptionalNode, Pattern, Query
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.register_as(*keys) ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/nxt_schema/validators/validator.rb', line 4
def self.register_as(*keys)
keys.each do |key|
NxtSchema::Validators::REGISTRY.register(key, self)
end
define_method('key') { @key ||= keys.first }
end
|
Instance Method Details
#translate_error(locale, **options) ⇒ Object