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

Input context #191

Open
stashymane opened this issue Feb 4, 2025 · 1 comment
Open

Input context #191

stashymane opened this issue Feb 4, 2025 · 1 comment

Comments

@stashymane
Copy link

Currently, it seems like you can only provide context to errors.
Would be great if you could validate based not only on the class itself, but also additional context parameters provided during runtime.
You can technically achieve this by just wrapping all the context parameters into their own class, but this gets unmanageable quickly.

@dhoepelman
Copy link
Collaborator

dhoepelman commented Feb 5, 2025

What do you imagine the API would look like?

In general the philosophy of Kotlin is that you should just create a new data class for specific data, see for example this KEEP. That would almost always be the best solution here i.m.o.

Specifically

this gets unmanageable quickly.

Can you give an example of where your proposed API would be significantly more manageable than creating a new data class for the purpose?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants