4 5 6 7
# File 'lib/valideez/regon_validator.rb', line 4 def validate_each(record, attribute, value) @message = options[:message] || "invalid format" record.errors[attribute] << @message unless Valideez::Regon.new(value).valid? end