{"id":19658185,"url":"https://github.com/cdaringe/runtypes-pretty-validation","last_synced_at":"2026-03-04T22:31:06.961Z","repository":{"id":65407778,"uuid":"591501931","full_name":"cdaringe/runtypes-pretty-validation","owner":"cdaringe","description":"runtypes pretty validation","archived":false,"fork":false,"pushed_at":"2024-07-31T22:39:21.000Z","size":119,"stargazers_count":2,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-30T23:49:04.240Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdaringe.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-20T23:06:52.000Z","updated_at":"2023-02-22T06:48:47.000Z","dependencies_parsed_at":"2025-11-30T13:02:56.597Z","dependency_job_id":null,"html_url":"https://github.com/cdaringe/runtypes-pretty-validation","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.4375,"last_synced_commit":"3055562d6ea7a489aec2ddc6be22dc932b7ed49b"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/cdaringe/runtypes-pretty-validation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fruntypes-pretty-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fruntypes-pretty-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fruntypes-pretty-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fruntypes-pretty-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdaringe","download_url":"https://codeload.github.com/cdaringe/runtypes-pretty-validation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fruntypes-pretty-validation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30096728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T21:59:23.547Z","status":"ssl_error","status_checked_at":"2026-03-04T21:57:50.415Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T15:36:23.746Z","updated_at":"2026-03-04T22:31:06.696Z","avatar_url":"https://github.com/cdaringe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# runtypes-pretty-validation\n\nvalidate [runtypes](https://github.com/pelotom/runtypes) schemas against a value, and reflect back a pretty validation report, matching the schema.\nPrettyifies structural error messages arbitrarily deep.\n\n```ts\nimport { validate } from \"runtypes-pretty-validation\";\nconst schema = rt.Record({ foo: rt.Literal(\"bar\") });\nvalidate(schema, null); // Expected object, got \"null\"\nvalidate(schema, { bar: \"bar\" }); // { foo: 'Expected literal `bar`, but was `undefined`' }\nvalidate(schema, { foo: \"bar\" }); // undefined, all valid\n```\n\n[![main](https://github.com/cdaringe/runtypes-pretty-validation/actions/workflows/main.yml/badge.svg)](https://github.com/cdaringe/runtypes-pretty-validation/actions/workflows/main.yml)\n\n## install\n\n`npm install runtypes-pretty-validation`\n\n## options\n\nOptions may be specified. See [./index.ts](./index.ts) for defaults.\n\n```ts\nvalidate(schema, value[, opts])\n```\n\n- `useFirstUnionSchemaOnFail: boolean`: if a validation fails all union members, report the schema validation errors from the first schema in the union.\n\n## examples\n\nsee [test.ts](./test.ts) for more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdaringe%2Fruntypes-pretty-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdaringe%2Fruntypes-pretty-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdaringe%2Fruntypes-pretty-validation/lists"}