Class: BooleanValidator
- Inherits:
-
BaseValidator
- Object
- ActiveModel::EachValidator
- BaseValidator
- BooleanValidator
- Defined in:
- lib/lite/validators/boolean_validator.rb
Constant Summary collapse
- CHECKS =
{ all: nil, false_only: %w[0 f false n no off], true_only: %w[1 t true y yes on] }.freeze
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
11 12 13 14 |
# File 'lib/lite/validators/boolean_validator.rb', line 11 def validate_each(record, attribute, value) assert_valid_check! super end |