What’s the proper way using ktor validation to return multiple invalid reasons? Like here I want the status error page plugin to get both reasons if both email and password are blank.
Copy code
validate<LoginRequest> {
if (it.email.isNullOrBlank()) {
ValidationResult.Invalid("Email blank")
}
if (it.password.isNullOrBlank()) {
ValidationResult.Invalid("Password blank")
}
}
a
Aleksei Tirman [JB]
08/02/2024, 8:37 AM
You can accumulate the reasons in a list and return a single