Sha256: f4d76bd53fd1b489b99bb51b2d55aefed1c02059e505ac4e1b8a0b2f8f8d30a0
Contents?: true
Size: 269 Bytes
Versions: 11
Compression:
Stored size: 269 Bytes
Contents
class PhoneValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) unless value =~ /^[0-9+\(\)#\.\s\/ext-]+$/i record.errors[attribute] << (options[:message] || I18n.t('flash_validators.errors.messages.phone')) end end end
Version data entries
11 entries across 11 versions & 1 rubygems