custom-format-validators

Register and manage custom format validators for z-schema.

349|91|Updated Jul 23, 2013
One-click install
npx skills add https://github.com/zaggino/z-schema --skill custom-format-validators
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: custom-format-validators
Source: https://github.com/zaggino/z-schema/tree/main/skills/custom-format-validators
Command: npx skills add https://github.com/zaggino/z-schema --skill custom-format-validators

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables developers to extend z-schema by registering and managing custom format validators, allowing stricter or custom data checks beyond built-in formats.

Core Features & Use Cases

  • Supports both sync and async validators for string and non-string inputs.
  • Global and instance-level registration of custom formats, plus per-schema overrides.
  • Provides tools to inspect, list, and control timeouts and draft-specific behavior for formats.

Quick Start

Register a custom format validator and then validate data against a sample schema using z-schema.

Frequently Asked Questions about custom-format-validators

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a custom format validator to z-schema?

To add a custom format validator to z-schema, you register it globally or per-instance using customFormats, allowing stricter data checks beyond built-in formats for both sync and async validation.

Does z-schema support async format validation?

z-schema supports async format validation by registering async validators across global and instance scopes, utilizing the asyncTimeout option to manage execution limits for non-blocking custom format checks.

What is the difference between global and instance-level custom format registration in z-schema?

Global custom format registration applies validators universally across a z-schema instance, while instance-level registration targets specific schemas, enabling per-schema overrides for distinct validation rules.

How do I inspect registered custom formats in z-schema?

You can inspect registered custom formats in z-schema by utilizing provided tools to list and document active format validators, ensuring visibility into applied sync and async validation rules.

Can I apply format assertions to non-string data types in z-schema?

z-schema allows applying custom format validators to non-string inputs, extending format assertions beyond standard string checks to enforce custom data rules across various data types.

How do I manage draft-specific behavior for custom formats in z-schema?

Manage draft-specific behavior for custom formats in z-schema by configuring formatAssertions and related options, ensuring custom validators align with the targeted JSON Schema draft specifications.