Sha256: b7f8be8122164264c50728d16570bcc5cd487f6340ad21a02e029a8cdd797663

Contents?: true

Size: 323 Bytes

Versions: 55

Compression:

Stored size: 323 Bytes

Contents

module Volt
  class PhoneNumberValidator < FormatValidator
    DEFAULT_OPTIONS = {
      with: /^(\+?\d{1,2}[\.\-\ ]?\d{3}|\(\d{3}\)|\d{3})[\.\-\ ]?\d{3,4}[\.\-\ ]?\d{4}$/,
      message: 'must be a phone number with area or country code'
    }

    private

    def default_options
      DEFAULT_OPTIONS
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
volt-0.9.7.pre8 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.7.pre7 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.7.pre6 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.7.pre5 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.7.pre3 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.7.pre2 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.6 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.6.pre3 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.6.pre2 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.6.pre1 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.5 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.5.pre12 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.5.pre11 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.5.pre9 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.5.pre8 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.5.pre7 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.5.pre6 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.5.pre5 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.5.pre4 lib/volt/models/validators/phone_number_validator.rb
volt-0.9.5.pre3 lib/volt/models/validators/phone_number_validator.rb