Sha256: 0cb85b40cede43f6245a13073c0d1bbd12bc6a257a37e478391e0165dee092a1
Contents?: true
Size: 288 Bytes
Versions: 11
Compression:
Stored size: 288 Bytes
Contents
class LongitudeValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) unless value.present? && value >= -180 && value <= 180 record.errors[attribute] << (options[:message] || I18n.t('flash_validators.errors.messages.longitude')) end end end
Version data entries
11 entries across 11 versions & 1 rubygems