-
Notifications
You must be signed in to change notification settings - Fork 0
ItalianZipCode
Giuseppe Cannella edited this page Feb 19, 2020
·
2 revisions
Type name | example |
---|---|
ItalianZipCode | 23887 |
import com.github.gekomad.regexcollection.ItalianZipCode
import com.github.gekomad.regexcollection.Validate.validate
assert(validate[ItalianZipCode]("""1234""") == None)
assert(validate[ItalianZipCode]("""1996""") == None)
assert(validate[ItalianZipCode]("""-23887""") == None)
assert(validate[ItalianZipCode]("""23887""") == Some("""23887"""))
assert(validate[ItalianZipCode]("""23001""") == Some("""23001"""))
assert(validate[ItalianZipCode]("""20066""") == Some("""20066"""))