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

Prevent empty values #143

Closed
Palpie opened this issue Aug 16, 2024 · 1 comment
Closed

Prevent empty values #143

Palpie opened this issue Aug 16, 2024 · 1 comment

Comments

@Palpie
Copy link

Palpie commented Aug 16, 2024

I would like an option to prevent empty values. With the option you would not have the Empty field and trying to create a new instance with an empty value would result in an ArgumentException being thrown.

@Palpie Palpie changed the title Prevent emptyvalues Prevent empty values Aug 16, 2024
@andrewlock
Copy link
Owner

You can kind of do this by creating your own template, as described in this post and this issue 🙂

One problem you will have is that you can still always create an instance of the type with the default keyword.

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