{"id":16339758,"url":"https://github.com/jkachmar/purescript-validation-experiment","last_synced_at":"2026-02-07T14:03:12.921Z","repository":{"id":93201818,"uuid":"112971929","full_name":"jkachmar/purescript-validation-experiment","owner":"jkachmar","description":"Experiment with, and provide examples for, PureScript's validation library","archived":false,"fork":false,"pushed_at":"2017-12-04T04:25:03.000Z","size":31,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-22T15:48:39.730Z","etag":null,"topics":["purescript","validation"],"latest_commit_sha":null,"homepage":"","language":"PureScript","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/jkachmar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2017-12-03T23:13:15.000Z","updated_at":"2020-04-02T22:01:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb8ffa9f-efc5-4e40-b131-286ae2660330","html_url":"https://github.com/jkachmar/purescript-validation-experiment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jkachmar/purescript-validation-experiment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkachmar%2Fpurescript-validation-experiment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkachmar%2Fpurescript-validation-experiment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkachmar%2Fpurescript-validation-experiment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkachmar%2Fpurescript-validation-experiment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkachmar","download_url":"https://codeload.github.com/jkachmar/purescript-validation-experiment/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkachmar%2Fpurescript-validation-experiment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29196630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T12:38:28.597Z","status":"ssl_error","status_checked_at":"2026-02-07T12:38:23.888Z","response_time":63,"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":["purescript","validation"],"created_at":"2024-10-10T23:55:06.213Z","updated_at":"2026-02-07T14:03:12.906Z","avatar_url":"https://github.com/jkachmar.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# purescript-validation-experiment\n\n## What Is this\nThis repo is just a little test of the `purescript-validation` library, mainly\nfor my own edification, but also hopefully to give an example of how both the\n`Semigroup` and `Semiring` versions of `Data.Validation`'s `V` type can prove\nuseful when validating input.\n\n## How Do I Use This?\nFirst, ensure that you have `node` and `npm` installed.\n\nThen, clone this repo...\n\n    git clone git@github.com:jkachmar/purescript-validation-experiment.git\n\n...install the dependencies and build the project...\n\n    npm install  \n\n...and run the example...\n\n    npm run validate\n\n...which should print the following to the console:\n\n    Semigroup Validation:\n    (Invalid [(BadEmail [EmptyField,InvalidEmailAddress]),(BadPassword [EmptyField,NoSpecialCharacter,LessThanMinLength])])\n    (Invalid [(BadEmail [InvalidEmailAddress]),(BadPassword [NoSpecialCharacter])])\n    (Invalid [(BadPassword [NoSpecialCharacter])])\n    (Invalid [(BadPassword [LessThanMinLength])])\n    (Valid \"{\\\"email\\\":\\\"good@email.com\\\",\\\"password\\\":\\\"abc123+-=\\\"}\")\n\n\n    Semiring Validation:\n    Invalid ([(BadContact [EmptyField,InvalidEmailAddress,InvalidPhoneNumber]),(BadPassword [EmptyField,NoSpecialCharacter,LessThanMinLength])])\n    Invalid ([(BadContact [InvalidEmailAddress,InvalidPhoneNumber]),(BadPassword [NoSpecialCharacter])])\n    Invalid ([(BadPassword [NoSpecialCharacter])])\n    Invalid ([(BadPassword [LessThanMinLength])])\n    Invalid ([(BadContact [InvalidEmailAddress,InvalidPhoneNumber])])\n    Valid (\"{\\\"contact\\\":{\\\"value0\\\":\\\"good@email.com\\\"},\\\"password\\\":\\\"abc123+-=\\\"}\")\n    Valid (\"{\\\"contact\\\":{\\\"value0\\\":\\\"+1 (555) 555-5555\\\"},\\\"password\\\":\\\"abc123+-=\\\"}\")\n\nNote that the `Semiring` validator has a record with a `value0` key in its\n`Valid` results. This is due to the unsafe stringification of `Contact`, which\nis a sum type.\n\n## What's Going On Here?\nTo see a relatively straightforward validator whose `Applicative` instance uses\n`Semigroup` to accumulate errors, check out\n[`src/Semigroup`](src/Semigroup.purs).\n\nTo see a relatively straightforward validator that uses `Semigroup` to\naccumulate errors while performing validation with the `Applicative` instance,\n`Semiring` to accumulate errors while validation with the `Alt` instance, check\nout [`src/Semiring`](src/Semiring.purs).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkachmar%2Fpurescript-validation-experiment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkachmar%2Fpurescript-validation-experiment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkachmar%2Fpurescript-validation-experiment/lists"}