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