class IsbnValidator

Public Instance Methods

validate_each(record, attribute, value) click to toggle source
# File lib/buweb/validators/isbn_validator.rb, line 4
def validate_each(record, attribute, value)
  unless Lisbn.new(value.to_s).valid?
    record.errors[attribute] << 'is not a valid ISBN'
  end
end