Skip to content
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

feat(): validation on boolean #5

Closed
davinkevin opened this issue Nov 28, 2018 · 4 comments
Closed

feat(): validation on boolean #5

davinkevin opened this issue Nov 28, 2018 · 4 comments
Labels
bug Something isn't working

Comments

@davinkevin
Copy link

Hi,

The example here doesn't seem to work on the last version:

class Foo(val bool: Boolean)
val v = Validator.builder<Foo>()
        .constraint(Foo::bool, "bool") { it.toTrue() } // this method signature isn't valid

The constraint method never has as first parameter a Function<T, Boolean> so this won't compile.

Due to that, I think the example in the doc isn't working > https://github.com/making/yavi/blob/develop/docs/FromBeanValidationToYAVI.md#asserttrue

@making
Copy link
Owner

making commented Nov 28, 2018

Good catch!
ToBoolean has been completely forgotten ...

@davinkevin
Copy link
Author

👍

@making making closed this as completed in dfdbbec Nov 28, 2018
@making making added the bug Something isn't working label Nov 28, 2018
@making
Copy link
Owner

making commented Nov 28, 2018

0.0.19 has just been released.
It's under the process of synchronizing maven central.

@davinkevin
Copy link
Author

davinkevin commented Nov 28, 2018

Thanks for your reactivity!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants