Skip to content

Add uuid checker #201

Description

@cinar

Proposal

Add a uuid checker following the established pattern (see email.go for the shape: const name, Err* sentinel, exported Is* func, reflect-based check* func, make* maker):

  • Tag syntax: checkers:"required uuid"
  • Validates RFC 4122 UUID format (case-insensitive), e.g. ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
  • Register a schema_maker.go entry mapping uuid → JSON Schema "format": "uuid"
  • Add the new error code + message to all 23 locale files in locales/, matching placeholders exactly (locales/locales_test.go enforces this — see CLAUDE.md)
  • 100% test coverage per CONTRIBUTING.md, including a checker_test.go/uuid_test.go pair
  • Add a ## [Unreleased] entry to CHANGELOG.md

This is one of the most requested validation tags for API/ID validation and is currently a common reason for evaluators bouncing to other libraries.

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