// Create a typescript enum and pass it to the validator
enum Status {
pending = "pending",
processing = "processing",
completed = "completed",
}
await e.enum(
// In order to translate a typescript enum to a validator understandable enum
// Use Object.values
Object.values(Status)
)
.validate(Status.processing) // returns "processing"
Case 3 (in method)
// e.in is the same as e.enum
await e.in(["pending", "done"] as const).validate("done") // returns "done"