Class: DefraRuby::Validators::PriceValidator

Inherits:
BaseValidator
  • Object
show all
Includes:
CanValidatePresence
Defined in:
lib/defra_ruby/validators/price_validator.rb

Instance Method Summary collapse

Instance Method Details

#validate_each(record, attribute, value) ⇒ Object



8
9
10
11
12
# File 'lib/defra_ruby/validators/price_validator.rb', line 8

def validate_each(record, attribute, value)
  return false unless value_is_present?(record, attribute, value)

  valid_format?(record, attribute, value)
end