{"skill":{"slug":"validator-tool","displayName":"Validator Tool","summary":"Validate data formats including JSON, email, URL, file paths, IP addresses, and phone numbers with detailed error reporting and batch processing.","description":"---\nname: validator-tool\ndescription: Validate data formats including JSON, email, URL, file paths, IP addresses, and phone numbers with detailed error reporting and batch processing.\n---\n\n# Validator Tool — Multi-Format Data Validation\n\nValidate, lint, and report errors across common data formats. Designed for input sanitization pipelines, CI checks, and API request validation.\n\n## Quick Start\n\n```bash\n# Validate a JSON string\nvalidator-tool --json '{\"name\":\"Alice\",\"age\":30}'\n\n# Validate an email address\nvalidator-tool --email \"user@example.com\"\n\n# Validate a URL\nvalidator-tool --url \"https://example.com/path?q=1\"\n```\n\n## Usage\n\n```bash\nvalidator-tool [TYPE] [INPUT] [OPTIONS]\n\nTypes:\n  --json      Validate JSON syntax and optional schema\n  --email     Validate email format (RFC 5321/5322)\n  --url       Validate URL format and scheme\n  --path      Validate file/directory path (exists, readable, writable)\n  --ip        Validate IPv4 or IPv6 address\n  --phone     Validate phone number format (E.164 or regional)\n\nOptions:\n  --schema FILE   JSON Schema file for --json validation\n  --strict        Strict mode (reject warnings as errors)\n  --batch FILE    Validate multiple inputs from a file (one per line)\n  --json-output   Output results as JSON\n  --verbose       Show detailed error reasons\n```\n\n## Examples\n\n```bash\n# Validate JSON with schema\nvalidator-tool --json '{\"id\":1,\"name\":\"Test\"}' --schema schema.json\n\n# Batch validate emails from file\nvalidator-tool --email --batch emails.txt --json-output\n\n# Validate an IP address\nvalidator-tool --ip \"192.168.1.1\"\n\n# Check if a file path exists and is writable\nvalidator-tool --path \"/tmp/log.txt\" --strict\n```\n\n## Features\n\n- **Multiple formats:** JSON, email, URL, path, IP, phone\n- **JSON Schema support:** Validate against draft-07 schemas\n- **Batch mode:** Process hundreds of inputs from a file\n- **Exit codes:** 0 = all valid, 1 = any invalid, 2 = error\n- **Machine-readable:** `--json-output` for pipeline integration\n- **Strict mode:** Surface warnings as errors\n- **i18n emails:** Supports internationalized email addresses\n","topics":["Batch Processing","Email","Json"],"tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":322,"installsAllTime":12,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1778344203901,"updatedAt":1778492888959},"latestVersion":{"version":"1.0.0","createdAt":1778344203901,"changelog":"Initial release","license":"MIT-0"},"metadata":null,"owner":{"handle":"dinghaibin","userId":"s170ed26v1mh4qzy7v9cnn7msx85mrn1","displayName":"BIN","image":"https://avatars.githubusercontent.com/u/9191597?v=4"},"moderation":null}