-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I implement List validation in Kotlin? #30
Comments
I'm not sure I get your question. Does this sample help you? |
Thank you for an answer. I want to know how to validate a simple List, |
I think I got you meant. use val validator = ValidatorBuilder.of<Form>()
.forEach(Form::users) {
constraint(String::toString, "value") { it.greaterThan(1) }
}
.build() In this example, the violation names will be like You can also use empty string as the name. val validator = ValidatorBuilder.of<Form>()
.forEach(Form::users) {
constraint(String::toString, "") { it.greaterThan(1) }
}
.build() In this example, the violation names will be like |
Thank you for your help. |
How do I implement List validation in Kotlin?
The text was updated successfully, but these errors were encountered: