Class: TypeValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- TypeValidator
- Defined in:
- lib/ansible/ruby/models/type_validator.rb
Overview
See LICENSE.txt for license
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/ansible/ruby/models/type_validator.rb', line 6 def validate_each(record, attribute, value) # Don't worry about this case, different validator return if value.is_a? NilClass failed = perform_validation(attribute, value) return unless failed failed = custom_error(value) if [:message] record.errors[attribute] << failed end |