Skip to content
Giuseppe Cannella edited this page Jan 14, 2019 · 10 revisions
Type name example
Email abc@def.com
import com.github.gekomad.regexcollection.Validate.validate
import com.github.gekomad.regexcollection.Email

assert(validate[Email]("$sdsdsd@sdf.com") == Some("$sdsdsd@sdf.com"))
assert(validate[Email]("sdsdsd@sdf.com") == Some("sdsdsd@sdf.com"))
assert(validate[Email]("bar@a.a") == Some("bar@a.a"))
assert(validate[Email]("   sdsdsd@sdf.com") == None)
assert(validate[Email]("abc,a@%.d") == None)
Clone this wiki locally