class Shamu::Attributes::Validators::ValidValidator
Validates that an attribute's value returns true for `valid?`.
validates :nested_request, valid: true
Public Instance Methods
validate_each( record, attribute, value )
click to toggle source
# File lib/shamu/attributes/validators/valid_validator.rb, line 8 def validate_each( record, attribute, value ) record.errors.add attribute, :invalid if value && !value.valid? end