Enum validation support?
See original GitHub issueIs it possible right now? related to #3
example:
enum Foo {
BAR = 'BAR',
BAZ = 'BAZ'
}
let e = z.enum(Foo);
e.parse("LOL"); // throws
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Validations for Enum Types - Baeldung
Learn how to build validations for enums using Java custom ... we'll set up a validator, which supports our newly defined annotations.
Read more >c# - Validate Enum Values - Stack Overflow
To validate if a value is a valid value in an enumeration, you only need to call the static method Enum ...
Read more >how to handle unknown enum values in swift & java.
Java Enum, @ValidEnum with Constraint that supports JsonIgnoreProperties if not registered. Basically: how to handle unknown enum values in swift & java.
Read more >How to Validate Enumeration Values in Property Setters
This behavior is unwanted on two levels. First, we don't want the enumeration property to receive a value that is not explicitly defined...
Read more >Binding and Validating Enums in ASP.NET Core - Ben Foster
The following utility class provides the methods to both validate and parse enums taking into account the EnumMemberAttribute to support ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
z.NativeEnum(MyEnum)
Worked for my with a prisma db schema generated enum
when you find your answer looking for the problem in google and can’t remember how you knew the answer a year back.
Back to the future debugging LOL