This repository was archived by the owner on Mar 27, 2026. It is now read-only.
Repository navigation
ValueObject for enums: how to properly validate? #14
Answered
by
chikamichi
chikamichi
asked this question in
Q&A
|
Hi 👋, Continuing on implementing my map project, let’s say I have this enum representing a map layer’s "type"/kind: If I wish to have some entity’s attribute be of that kind, as far as I understand (and based on trial/error), it cannot be simply typed as a Is there a better way? I feel like enums being sealed by design, having to come up with a dedicated value object is useless boilerplate, but maybe I’m missing something? |
Answered by
chikamichi
Jun 4, 2023
Replies: 1 comment 1 reply
|
Well, I guess that’s that: 🙈 |
1 reply
Answer selected by
CodingSoot
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Well, I guess that’s that:
🙈