-
Notifications
You must be signed in to change notification settings - Fork 0
Giuseppe Cannella edited this page Jan 6, 2019
·
10 revisions
Type name | example |
---|---|
abc@def.com |
import com.github.gekomad.regexcollection.Email
assert(isValid[Email]("sdsdsd@sdf.com") == true)
assert(isValid[Email](" sdsdsd@sdf.com") == false)
assert(isValid[Email]("abc,a@%.d") == false)
Type name | example |
---|---|
EmailSimple | a@b.c |
import com.github.gekomad.regexcollection.EmailSimple
assert(isValid[EmailSimple]("abc,a@%.d") == true)
using a custom pattern:
import com.github.gekomad.regexcollection.Email
implicit val validator = Validator[Email](""".+@.+\..+""")
assert(isValid[Email]("abc,a@%.d") == true)