Class: ZipTypeValidator

Inherits:
ActiveModel::EachValidator
  • Object
show all
Defined in:
app/validators/zip_type_validator.rb

Instance Method Summary collapse

Instance Method Details

#validate_each(record, attribute, value) ⇒ Object



2
3
4
5
6
7
# File 'app/validators/zip_type_validator.rb', line 2

def validate_each(record, attribute, value)
unless value.blank?
	record[attribute] = value.to_i
	return value = value.to_i + 0
end
end