{"id":24330873,"url":"https://github.com/feliux/validate","last_synced_at":"2026-04-21T12:01:54.876Z","repository":{"id":237036423,"uuid":"793665400","full_name":"feliux/validate","owner":"feliux","description":"Golang FOP implementation for validating params","archived":false,"fork":false,"pushed_at":"2024-04-29T16:57:31.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T11:19:15.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/feliux.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":"2024-04-29T16:33:36.000Z","updated_at":"2024-04-29T18:31:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"fbc45d48-1c98-4024-ad36-67d424140f26","html_url":"https://github.com/feliux/validate","commit_stats":null,"previous_names":["feliux/validate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/feliux/validate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feliux%2Fvalidate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feliux%2Fvalidate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feliux%2Fvalidate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feliux%2Fvalidate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feliux","download_url":"https://codeload.github.com/feliux/validate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feliux%2Fvalidate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32091053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":"2025-01-18T01:14:57.065Z","updated_at":"2026-04-21T12:01:54.842Z","avatar_url":"https://github.com/feliux.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Functional Go implementation for validating params. Useful for http handlers!\n\n**Usage**\n\n```go\ntype AccountSetupParams struct {\n\tUsername string\n}\n\ntype AccountSetupErrors struct {\n\tUsername string\n}\n\nfunc HandleAccountSetup(w http.ResponseWriter, r *http.Request) error {\n\tvar errors auth.AccountSetupErrors\n\tparams := auth.AccountSetupParams{\n\t\tUsername: r.FormValue(\"username\"),\n\t}\n\tok := validations.New(\u0026params, validations.Fields{\n\t\t\"Username\": validations.Rules(validations.Min(2), validations.Max(50)),\n\t}).Validate(\u0026errors)\n\tif !ok {\n\t\t// handle !ok\n\t}\n    // handle ok ...\n}\n```\n\n```go\ntype SignupParams struct {\n\tEmail           string\n\tPassword        string\n\tConfirmPassword string\n}\n\ntype SignupErrors struct {\n\tEmail           string\n\tPassword        string\n\tConfirmPassword string\n}\n\nfunc HandleSignupForm(w http.ResponseWriter, r *http.Request) error {\n\tsignupParams := auth.SignupParams{\n\t\tEmail:           r.FormValue(\"email\"),\n\t\tPassword:        r.FormValue(\"password\"),\n\t\tConfirmPassword: r.FormValue(\"confirmPassword\"),\n\t}\n\terrors := auth.SignupErrors{}\n\tif ok := validations.New(\u0026signupParams, validations.Fields{\n\t\t\"Email\":    validations.Rules(validations.Email),\n\t\t\"Password\": validations.Rules(validations.Password),\n\t\t\"ConfirmPassword\": validations.Rules(\n\t\t\tvalidations.Equal(signupParams.Password),\n\t\t\tvalidations.Message(\"Passwords do not match\"),\n\t\t),\n\t}).Validate(\u0026errors); !ok {\n        // handle !ok\n\t}\n    // handle ok ...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeliux%2Fvalidate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeliux%2Fvalidate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeliux%2Fvalidate/lists"}