{"id":38583705,"url":"https://github.com/budnieswski/validate-struct","last_synced_at":"2026-01-17T08:17:31.687Z","repository":{"id":57691496,"uuid":"481241981","full_name":"budnieswski/validate-struct","owner":"budnieswski","description":"Go package for Struct Validation - Validate the data coming from a JSON into a Struct, without having to decode it beforehand!","archived":false,"fork":false,"pushed_at":"2022-04-29T20:28:52.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-22T17:11:03.462Z","etag":null,"topics":["go","golang","golang-library","golang-package","struct-validator","validate","validation","validation-library","validator"],"latest_commit_sha":null,"homepage":"","language":"Go","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/budnieswski.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2022-04-13T14:07:50.000Z","updated_at":"2024-01-11T18:06:13.000Z","dependencies_parsed_at":"2022-09-26T20:53:20.579Z","dependency_job_id":null,"html_url":"https://github.com/budnieswski/validate-struct","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/budnieswski/validate-struct","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/budnieswski%2Fvalidate-struct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/budnieswski%2Fvalidate-struct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/budnieswski%2Fvalidate-struct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/budnieswski%2Fvalidate-struct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/budnieswski","download_url":"https://codeload.github.com/budnieswski/validate-struct/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/budnieswski%2Fvalidate-struct/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504359,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"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":["go","golang","golang-library","golang-package","struct-validator","validate","validation","validation-library","validator"],"created_at":"2026-01-17T08:17:31.534Z","updated_at":"2026-01-17T08:17:31.663Z","avatar_url":"https://github.com/budnieswski.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Validate Struct\n[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/budnieswski/validate-struct?style=flat-square)](https://github.com/budnieswski/validate-struct/tags)\n[![Coveralls](https://img.shields.io/coveralls/github/budnieswski/validate-struct?style=flat-square)](https://coveralls.io/github/budnieswski/validate-struct?branch=main)\n[![Go Report Card](https://goreportcard.com/badge/github.com/budnieswski/validate-struct)](https://goreportcard.com/report/github.com/budnieswski/validate-struct)\n[![GoDoc](https://godoc.org/github.com/budnieswski/validate-struct?status.svg)](https://pkg.go.dev/github.com/budnieswski/validate-struct)\n[![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/budnieswski/validate-struct?style=flat-square)](#)\n[![License](https://img.shields.io/dub/l/vibe-d.svg?style=flat-square)](#)\n\n\n\n\n## Contents\n- [Install](#install)\n- [Example](#example)\n- [Goals](#goals)\n\n## Install\n```\ngo get github.com/budnieswski/validate-struct\n```\n\n## Example\n```golang\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\tValidateStruct \"github.com/budnieswski/validate-struct\"\n)\n\ntype User struct {\n\tID     uint64 `json:\"id\" validate:\"required,min=2,max=4\"`\n\tName   string `json:\"name\" validate:\"required,min=3\"`\n\tStatus bool   `json:\"status\"`\n}\n\nfunc main() {\n\tinput := []byte(`\n\t\t{\n\t\t\t\"id\": 12,\n\t\t\t\"name\": \"Mr Dummy\",\n\t\t\t\"status\": true\n\t\t}\n\t`)\n\n\tvalid := ValidateStruct.Validate(input, User{})\n\n\tif len(valid) \u003e 0 {\n\t\tfmt.Println(\"Validation failed\")\n\t\tresp, _ := json.Marshal(valid)\n\t\tfmt.Println(string(resp))\n\t}\n}\n```\n\n## Goals\n- [ ] Create validate tests\n- [ ] Create rule tests\n- [ ] Standardize validate error return\n- [ ] Create Github templates\n\t- [ ] Contributing\n\t- [ ] Issue\n\t- [ ] Pull request\n- [ ] Create Github workflows\n\t- [X] Tests\n\t- [X] Coverage\n\t- [ ] CI\n- [ ] Create doc.go\n- [ ] Make validate benchmarks\n- [ ] Improve performance\n- [ ] Create a way for the user add custom rules","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbudnieswski%2Fvalidate-struct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbudnieswski%2Fvalidate-struct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbudnieswski%2Fvalidate-struct/lists"}