https://kotlinlang.org logo
#arrow
Title
r

raulraja

02/06/2019, 3:13 PM
Copy code
Rules accumulateErrors {
  listOf(
    FormField("Invalid Email Domain Label", "<http://nowhere.com|nowhere.com>"),
    FormField("Too Long Email Label", "nowheretoolong${(0..251).map { "g" }}"), //this accumulates N errors
    FormField("Valid Email Label", "<mailto:getlost@nowhere.com|getlost@nowhere.com>")
  ).map { it.validateEmail() }
}