I’d like to have support for a #[validate(one_of(...))] attribute to simplify enum-like validations. Right now, I believe this can only be done in a custom function. A built-in validator like the following would be much cleaner.
#[validate(one_of("pending", "completed", "failed"))]
status: String
Similar functionality exists in marshmallow validate.OneOf
I’m open to feedback on this, but I wanted to see if this is something that would be aligned with the goals of this crate.