Skip to content

Validator tag alias #29

@typerandom

Description

@typerandom

We should add the ability to register a tag alias.

Suggestion

Make the Register method accept an interface{} and if it's a string then register it using an "AliasValidator".

validator.Register("port", "min(0),max(65535)")
validator.Register("ip4", "regexp(´\\b((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\.|$)){4}\\b´)")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions