class Viitenumero::ViiteValidator

Public Instance Methods

validate_each(record, attribute, value) click to toggle source
# File lib/viitenumero/viite_validator.rb, line 3
def validate_each(record, attribute, value)
  record.errors[attribute] << (options[:message] || 'on virheellinen') unless Viite.valid?(value)
end