Skip to content

Add context-aware validation functionsΒ #87

@sivchari

Description

@sivchari

Description

Add context.Context support to validation functions for i18n and future extensibility.

Implementation Details

Generated functions:

// New context-aware version
func ValidateUserContext(ctx context.Context, t *User) error

// Existing function delegates to context version
func ValidateUser(t *User) error {
    return ValidateUserContext(context.Background(), t)
}

Primary use case: Pass language information for i18n. Maintains backward compatibility.

Success Criteria

  • Context versions generated for all validators
  • Existing functions continue to work
  • Context properly propagated through validation

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions