You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are there any examples or extensions available to use case classes with the validation framework?
I guess it would be easy enough to just write a bit of code to turn a case class to a map and use the MapValidator, but it would be nice to have a similar validation feel like in RoR. Something like...
case class Person(name: String)
val validator = Validator(person, person is required, person, .....more validations)
Thoughts?
The text was updated successfully, but these errors were encountered:
I'm not sure what you need. ActiveRecord-ish DSL? If so, we need to build new APIs that make full use of Java reflection API calls and implicit conversions... I'm not sure that's really nice.
Currently, skinny-validator can work with case classes. I hope you'll like it.
If you hope to simplify param("name" -> person.name) is required more, I can understand. But, just an idea, enabling person.name is required will require quite heavy implicit conversions there. I'm afraid it won't make developers happy due to its negative side effect.
Are there any examples or extensions available to use case classes with the validation framework?
I guess it would be easy enough to just write a bit of code to turn a case class to a map and use the MapValidator, but it would be nice to have a similar validation feel like in RoR. Something like...
Thoughts?
The text was updated successfully, but these errors were encountered: