Sha256: 3ba2ce6b9add072c0c9e1865aeedce34cad32c229ad9132e4928194b80b60739
Contents?: true
Size: 258 Bytes
Versions: 11
Compression:
Stored size: 258 Bytes
Contents
class StripeTypeValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) if value.nil? || !value.in?( %w(individual corporation) ) record.errors[attribute] << "must specify either individual or corporate" end end end
Version data entries
11 entries across 11 versions & 1 rubygems