Skip to content

Add custom validators #4

Description

@claudiocn

Is your feature request related to a problem? Please describe.
After using some equivalent guard clause libraries in other programming languages, using CheckArg fills like it's completely static, without having the dynamics that some of those libraries have: the ability to accept additional validators.

This is something really important in other languages (that make use of object definitions) and their validation could be done automatically for each internal property. Although Python might not be so object-oriented, its normal usage has its own objects and when developing big projects this feature can come really handy.

Describe the solution you'd like
This feature requires discussion to have a good solution, there are different ways to handle this kind of situations, from completely manual and static validator which would be outside the CheckArg scope to a validator registration in the CheckArg, requiring it to be an instance or something else that would catalog the registered validators.

This feature request aims to have something that can be registered and directly used those custom validator from CheckArg,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions