Skip to content

Validating against enum #44

Closed
Closed
@peterkronenberg

Description

@peterkronenberg

Is there a way to validate an argument to ensure that it has only a list of specific values?

For example

func(
          suit = Json(hearts | clubs | spades | diamonds)
):

Or maybe validate against an existing Python enum

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions