konform-kt / konform

Portable validations for Kotlin
https://www.konform.io
MIT License
652 stars 39 forks source link

Allow for optional provision of a custom error message. #10

Closed ghost closed 5 years ago

ghost commented 5 years ago

It would be nice if every constraint function in the builder had an optional argument for providing your own custom messages. Literally just an extra customMessage: String? = null argument.

timrobertsdev commented 5 years ago

You can do this with the hint extension function on Constraint. An example is shown in the second code block here.

ghost commented 5 years ago

Already taken care of :D