{"id":20963856,"url":"https://github.com/codemix/validating","last_synced_at":"2025-05-14T09:31:46.410Z","repository":{"id":17649291,"uuid":"20453801","full_name":"codemix/validating","owner":"codemix","description":"Quick and easy validators for node.js and the browser.","archived":false,"fork":false,"pushed_at":"2014-08-23T23:27:29.000Z","size":260,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-06T08:51:27.907Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/codemix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-03T18:12:16.000Z","updated_at":"2016-01-14T11:19:43.000Z","dependencies_parsed_at":"2022-09-02T22:01:11.978Z","dependency_job_id":null,"html_url":"https://github.com/codemix/validating","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fvalidating","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fvalidating/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fvalidating/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fvalidating/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemix","download_url":"https://codeload.github.com/codemix/validating/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254112269,"owners_count":22016722,"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":[],"created_at":"2024-11-19T02:48:39.841Z","updated_at":"2025-05-14T09:31:41.395Z","avatar_url":"https://github.com/codemix.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Validating\n\n[![Build Status](https://travis-ci.org/codemix/validating.svg?branch=master)](https://travis-ci.org/codemix/validating)\n\n\n# Installation\n\nVia [npm](https://npmjs.org/package/validating):\n\n    npm install --save validating\n\n\nor [bower](http://bower.io/search/?q=validating):\n\n\n    bower install --save validating\n\n\n# Usage\n\n\n### Create a function which can validate objects\n\n```js\nvar validating = require('validating');\n\nvar userDescriptors = {\n  name: {\n    rules: [\n      ['required'],\n      ['regexp', {pattern: /^[A-Za-z][A-Za-z0-9]*$/}]\n    ]\n  },\n  email: {\n    rules: [\n      {name: 'email'},\n      {name: 'required'}\n    ]\n  }\n};\n\n\nvar validateUser = validating.forDescriptors(userDescriptors);\n\nvar result = validateUser({\n  name: null,\n  email: 'not a valid email address...'\n});\n\nconsole.log(result.valid);\nconsole.log(result.errors);\n\n```\n\n\n\n# Running the tests\n\nFirst, `npm install`, then `npm test`. Code coverage generated with `npm run coverage`.\n\n\n# License\n\nMIT, see [LICENSE.md](LICENSE.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemix%2Fvalidating","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemix%2Fvalidating","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemix%2Fvalidating/lists"}