validations/zip_validator.rb in bizside-2.2.0 vs validations/zip_validator.rb in bizside-2.2.1
- old
+ new
@@ -10,11 +10,10 @@
zip2 = get_other_value(record)
return if (zip1.nil? or zip1.empty?) and (zip2.nil? or zip2.empty?)
unless validate_zip(zip1, zip2)
- record.errors[attribute] << I18n.t('errors.messages.zip')
- return
+ record.errors.add(attribute, I18n.t('errors.messages.zip'))
end
end
private