Skip to content

Return from Custom validators (added through CustomTypeTagMap) error instead of bool #444

@sergeyglazyrindev

Description

@sergeyglazyrindev

Feature Request

New Feature : yes
RFC: no
BC Break: no

Summary

Hello guys!
I am writing some go project and I thought it would be better if we return from custom validators specific error, instead of boolean. That helps to use custom validators to validate different possible wrong cases. Basically, in my project I wanted to create custom validator to validate username against few rules, instead of writing long struct field annotations.
But seems like it's not possible right now.
I can do that if community likes this idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions