{"id":22829437,"url":"https://github.com/esanmiguelc/elm-validate","last_synced_at":"2025-04-23T17:08:37.495Z","repository":{"id":57675076,"uuid":"96658930","full_name":"esanmiguelc/elm-validate","owner":"esanmiguelc","description":"Validation library inspired by ecto changeset validations.","archived":false,"fork":false,"pushed_at":"2023-03-02T13:45:00.000Z","size":56,"stargazers_count":6,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-23T17:08:08.076Z","etag":null,"topics":["elm","validations"],"latest_commit_sha":null,"homepage":"http://package.elm-lang.org/packages/esanmiguelc/elm-validate","language":"Elm","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/esanmiguelc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-09T03:32:27.000Z","updated_at":"2024-02-18T12:48:21.000Z","dependencies_parsed_at":"2023-01-23T15:31:35.382Z","dependency_job_id":null,"html_url":"https://github.com/esanmiguelc/elm-validate","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esanmiguelc%2Felm-validate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esanmiguelc%2Felm-validate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esanmiguelc%2Felm-validate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esanmiguelc%2Felm-validate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esanmiguelc","download_url":"https://codeload.github.com/esanmiguelc/elm-validate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250477812,"owners_count":21437049,"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","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":["elm","validations"],"created_at":"2024-12-12T19:24:29.729Z","updated_at":"2025-04-23T17:08:37.434Z","avatar_url":"https://github.com/esanmiguelc.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elm-validate\n\n[![Build Status](https://travis-ci.org/esanmiguelc/elm-validate.svg?branch=master)](https://travis-ci.org/esanmiguelc/elm-validate)\n\nLink to package: http://package.elm-lang.org/packages/esanmiguelc/elm-validate\n\nLink to repository: https://github.com/esanmiguelc/elm-validate\n\nValidation library inspired by ecto changeset validations. The idea behind this project is to be able to concatenate validations and ultimately get a `ValidationResult` which provides all of the errors produced by the pipeline, which can then be used in any desired manner.\n\n## The Gist:\n\nYou start by adding `beginValidation` which puts your `Model` inside a context that allows it to be piped through all of the validations.\n\n```elm\nbeginValidation {password = \"somepass\"}\n  |\u003e validateLengthOf .password 8 \"Password is too short\"\n```\n\nOnce you are done with it you can pattern match the result like so:\n\n```elm\nlet\n  result =\n    beginValidation {email = \"email@example.com\", password = \"somepass\"}\n      |\u003e validatePresenceOf .email \"Email must be present\"\n      |\u003e validateLengthOf .password 8 \"Password is too short\"\nin\n  case result of\n    Valid model -\u003e\n      {- do stuff with a valid model here -}\n      ( model, logUserIn model )\n    Err model errors -\u003e\n      {- do stuff with the errors here -}\n      ( { model | errors = errors }, Cmd.none )\n```\n\n## Contributing\n\nAfter you have read the [Code of conduct](CODE_OF_CONDUCT.md).\n\n1. Fork the repo.\n2. Write some tests.\n3. Make 'em pass\n4. Stuck? Ask a Question!\n5. Create a pull request - make sure your tests pass.\n6. Have a cup of :coffee:\n\n### Setting up\n\n1. Clone the repository.\n\n```bash\n$ git clone git@github.com:esanmiguelc/elm-validate.git\n```\n\n2. Make sure you have [npm](https://www.npmjs.com/get-npm) installed.\n3. Install dependencies.\n\n```bash\n$ npm install\n```\n\n4. Run the tests\n\n```bash\n$ npm run test\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesanmiguelc%2Felm-validate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesanmiguelc%2Felm-validate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesanmiguelc%2Felm-validate/lists"}