Closed nlundquist closed 3 years ago
when detecting an enum with type: string the joi validator returned by enjoi is built off the any type instead of string.
type: string
any
string
this prevents use of some string specific functionality in joi, like case insensitive comparisons against the enum.
this modification makes enjoi return a joi string-typed enum instead.
Can you add a test case?
when detecting an enum with
type: string
the joi validator returned by enjoi is built off theany
type instead ofstring
.this prevents use of some string specific functionality in joi, like case insensitive comparisons against the enum.
this modification makes enjoi return a joi string-typed enum instead.