{"id":19086743,"url":"https://github.com/jangbl/node-request-body-validation","last_synced_at":"2025-10-05T09:55:14.062Z","repository":{"id":44461415,"uuid":"273304842","full_name":"jangbl/node-request-body-validation","owner":"jangbl","description":"demonstrates how to validate the request body of requests in Node","archived":false,"fork":false,"pushed_at":"2023-05-13T11:04:04.000Z","size":995,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T00:41:08.933Z","etag":null,"topics":["data-transfer-object","dto","express-request-validation","javascript","node","node-request-body","request-body","request-validate","request-validation","request-validator"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/jangbl.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":"2020-06-18T17:52:23.000Z","updated_at":"2023-08-20T09:13:40.000Z","dependencies_parsed_at":"2024-10-03T21:48:01.296Z","dependency_job_id":null,"html_url":"https://github.com/jangbl/node-request-body-validation","commit_stats":null,"previous_names":["jangbl/node-request-body-validation","productioncoder/node-request-body-validation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jangbl%2Fnode-request-body-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jangbl%2Fnode-request-body-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jangbl%2Fnode-request-body-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jangbl%2Fnode-request-body-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jangbl","download_url":"https://codeload.github.com/jangbl/node-request-body-validation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251678085,"owners_count":21626283,"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":["data-transfer-object","dto","express-request-validation","javascript","node","node-request-body","request-body","request-validate","request-validation","request-validator"],"created_at":"2024-11-09T03:00:22.201Z","updated_at":"2025-10-05T09:55:09.000Z","avatar_url":"https://github.com/jangbl.png","language":"JavaScript","readme":"# Node request body validation\n\nThis repository contains sample code on how to perform request body validation with the Node.js [express](https://expressjs.com/) framework and  [yup](https://github.com/jquense/yup)\n\n\u003ch3 align=\"center\"\u003ePlease help this repo with a ⭐️ if you find it useful! 😁\u003c/h3\u003e\n\nThis repository is part of the [Request body validation in Node](https://www.youtube.com/playlist?list=PL1Nml43UBm6dM110xcNUvdYgbQ3cnIBJm) tutorial series provided by [productioncoder.com](https://productioncoder.com/).\n\n[![Request body validation in Node](images/node-request-body-validation.png)](https://www.youtube.com/playlist?list=PL1Nml43UBm6dM110xcNUvdYgbQ3cnIBJm)\n\nFor updates, please reach out to [@_jgoebel](https://twitter.com/_jgoebel) on Twitter.\n\n# How to run this application\n\n## Running the project\n\nMake sure to install the dependencies with `npm`\n\n```\nnpm install\n```\n\nYou can then run the project by executing\n\n```\nnpm run dev\n```\n\n## API\n\n### POST /dev\n\nExpected payload\n\n```\n{\n    \"email\": \"john@example.com\",\n    \"firstName\": \"John\",\n    \"dob\": \"12-31-1950\",\n    \"countryCode\": \"US\"\n}\n```\n\nThe server will return a `400` bad request error if the request body does not conform to the expected DTO (data transfer object).\n\nPlease check out the `./dto` directory to learn more about the expected request body.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjangbl%2Fnode-request-body-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjangbl%2Fnode-request-body-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjangbl%2Fnode-request-body-validation/lists"}