Skip to content

US phone number

Giuseppe Cannella edited this page Feb 19, 2020 · 4 revisions
Type name example
USphoneNumber
555-555-5555
1 416 555 9292
4035555678
(416)555-3456
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.USphoneNumber

assert(validate[USphoneNumber]("555-555-5555") == Some("555-555-5555"))
Clone this wiki locally