Sha256: 8d9fdf80300cda1b2a65f6f54766f55bf3d18126dc34632a9597a450f71959f5
Contents?: true
Size: 280 Bytes
Versions: 17
Compression:
Stored size: 280 Bytes
Contents
I18n.load_path += Dir.glob( File.expand_path('../locales/*.{rb,yml}', __FILE__) ) class PhoneValidator < ActiveModel::EachValidator def validate_each(object, attribute, value) object.errors.add(attribute, :invalid_phone_number) unless Phonie::Phone.valid?(value) end end
Version data entries
17 entries across 17 versions & 1 rubygems