Skip to content

Add eq/ne literal value checkers #204

Description

@cinar

Proposal

eq-field/before-field/after-field etc. compare against a sibling struct field, but there's no checker for comparing a field against a literal constant. Add eq/ne:

  • Tag syntax: checkers:"ne:admin", checkers:"eq:active"
  • Simple equality/inequality against the string parameter
  • Register schema_maker.go mappings: eqconst, ne{"not": {"const": ...}}
  • Add error codes + messages to all 23 locale files
  • 100% test coverage; CHANGELOG.md entry

Follow the established checker file pattern (see email.go).

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 request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions