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