Validated
val fields = listOf(
FormField("Invalid Email Domain Label", "nowhere.com"),
//this fails
FormField("Too Long Email Label", "nowheretoolong${(0..251).map { "g"
}}")
FormField("Valid Email Label", "
[email protected]")
)
Rules(Strategy.ErrorAccumulation, fields)
/* Either.Left(NonEmptyList(
NotAnEmail(reasons=NonEmptyList(DoesNotContain(value=@))),
NotAnEmail(reasons=NonEmptyList(DoesNotContain(value=@),
MaxLength(value=250)))
))*/