{"id":22196661,"url":"https://github.com/druids/struct.validators","last_synced_at":"2025-08-19T01:07:43.279Z","repository":{"id":62434740,"uuid":"134825256","full_name":"druids/struct.validators","owner":"druids","description":"Additional validators for Struct library","archived":false,"fork":false,"pushed_at":"2018-10-19T07:21:03.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-30T23:36:34.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/druids.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-25T08:11:30.000Z","updated_at":"2018-10-19T07:21:05.000Z","dependencies_parsed_at":"2022-11-01T21:02:12.016Z","dependency_job_id":null,"html_url":"https://github.com/druids/struct.validators","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/druids/struct.validators","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fstruct.validators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fstruct.validators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fstruct.validators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fstruct.validators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/druids","download_url":"https://codeload.github.com/druids/struct.validators/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fstruct.validators/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271083630,"owners_count":24696333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-12-02T14:16:01.191Z","updated_at":"2025-08-19T01:07:42.948Z","avatar_url":"https://github.com/druids.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"struct.validators\n=================\n\nAdditional validators for [Struct library](https://github.com/funcool/struct). It *DOES NOT* include Struct itself.\n\n[![CircleCI](https://circleci.com/gh/druids/struct.validators.svg?style=svg)](https://circleci.com/gh/druids/struct.validators)\n[![Dependencies Status](https://jarkeeper.com/druids/struct.validators/status.png)](https://jarkeeper.com/druids/struct.validators)\n[![License](https://img.shields.io/badge/MIT-Clause-blue.svg)](https://opensource.org/licenses/MIT)\n\n\nLeiningen/Boot\n--------------\n\n```clojure\n[struct.validators \"0.9.0\"]\n```\n\n\nDocumentation\n-------------\n\nThis library adds following validators:\n\n- `non-blank`: forces a non-nil value not to be blank (spaces aren't allowed)\n- `non-blank-like`: coerces a non-nil value to `nil` if the value is an empty string or contains only white spaces\n  coerces the value to `nil`, otherwise makes no changes\n- `keyword-like`: coerces a non-blank value to a `keyword`\n- `truth`: validates if a given value is `true`\n- `enum-factory`: creates a validator that validates if a value is in a given coll (it should be a set for perf.)\n- `every-factory`: creates a validator that validates if all items in a sequence satisfy a given scheme, allow\n to pass an option map for `validate` function (`{:strip true}` is used as default)\n- `bigdec-str`: coerces a non-blank value to a `bigdec` (Clojure only)\n- `uuid-str-like`: works like the original `uuid-str`, but accepts also future version of UUID\n- `cz-phone`: validates a given value if it's a valid phone number, if so it formats the value into `E164`\n (+420777666555), if the value is without prefix, `+420` will be used as default (Clojure only)\n\nValidators for other countries can be defined via `phone-factory` function e.g.:\n\n```clojure\n(require '[structs.api :as st])\n\n(def de-phone (st/phone-factory \"DE\"))\n```\n\n\nConsider using namespace `struct.api` that combines all public functions and validators from `struct.core`\n and `struct.validators` at one place. Example:\n\n```clojure\n(require '[struct.api :as st])\n\n(st/validate {:name \"foo\"} {:name [st/required st/non-blank]})\n[nil {:name \"foo\"}]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdruids%2Fstruct.validators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdruids%2Fstruct.validators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdruids%2Fstruct.validators/lists"}