{"id":30580565,"url":"https://github.com/react-component/form-validation","last_synced_at":"2025-08-29T05:37:20.940Z","repository":{"id":26405295,"uuid":"29855250","full_name":"react-component/form-validation","owner":"react-component","description":"This project is deprecated, you can try https://github.com/react-component/form","archived":false,"fork":false,"pushed_at":"2021-06-22T21:29:03.000Z","size":2159,"stargazers_count":85,"open_issues_count":10,"forks_count":18,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-08-09T14:17:00.590Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"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/react-component.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-26T10:00:03.000Z","updated_at":"2025-06-19T09:38:13.000Z","dependencies_parsed_at":"2022-08-29T03:51:33.065Z","dependency_job_id":null,"html_url":"https://github.com/react-component/form-validation","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/react-component/form-validation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fform-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fform-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fform-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fform-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-component","download_url":"https://codeload.github.com/react-component/form-validation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fform-validation/sbom","scorecard":{"id":765359,"data":{"date":"2025-08-11","repo":{"name":"github.com/react-component/form-validation","commit":"794a4b656a6ff16b99114400a076344fbf3054f9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T00:37:12.487Z","repository_id":26405295,"created_at":"2025-08-23T00:37:12.487Z","updated_at":"2025-08-23T00:37:12.487Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272636182,"owners_count":24967983,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-08-29T05:37:18.234Z","updated_at":"2025-08-29T05:37:20.935Z","avatar_url":"https://github.com/react-component.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rc-form-validation\n---\n\nFormValidation For React.\n\n\u003cspan style=\"color:red;\"\u003eThis project is obseleted,\nyou can try \u003ca href=\"http://react-component.github.io/form/\"\u003erc-form\u003c/a\u003e\u003c/span\u003e.\n\n[![NPM version][npm-image]][npm-url]\n[![SPM version](http://spmjs.io/badge/rc-form-validation)](http://spmjs.io/package/rc-form-validation)\n[![build status][travis-image]][travis-url]\n[![Coverage Status](https://coveralls.io/repos/react-component/form-validation/badge.svg)](https://coveralls.io/r/react-component/form-validation)\n[![gemnasium deps][gemnasium-image]][gemnasium-url]\n[![node version][node-image]][node-url]\n[![npm download][download-image]][download-url]\n[![Sauce Test Status](https://saucelabs.com/buildstatus/rc-form-validation)](https://saucelabs.com/u/rc-form-validation)\n\n[![Sauce Test Status](https://saucelabs.com/browser-matrix/rc-form-validation.svg)](https://saucelabs.com/u/rc-form-validation)\n\n[npm-image]: http://img.shields.io/npm/v/rc-form-validation.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-form-validation\n[travis-image]: https://img.shields.io/travis/react-component/form-validation.svg?style=flat-square\n[travis-url]: https://travis-ci.org/react-component/form-validation\n[gemnasium-image]: http://img.shields.io/gemnasium/react-component/form-validation.svg?style=flat-square\n[gemnasium-url]: https://gemnasium.com/react-component/form-validation\n[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square\n[node-url]: http://nodejs.org/download/\n[download-image]: https://img.shields.io/npm/dm/rc-form-validation.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-form-validation\n\n## Feature\n\n* support ie8,ie8+,chrome,firefox,safari\n\n## install\n\n[![rc-form-validation](https://nodei.co/npm/rc-form-validation.png)](https://npmjs.org/package/rc-form-validation)\n\n## Usage\n\n```js\nvar Validation = require('../');\nvar Validator = Validation.Validator;\nReact.render(\u003cValidation ref='validation' onValidate={this.onValidate}\u003e\n        \u003cValidator ref='validator' rules={[{type: 'string', min: 5, max: 10}, {validator: validateInput}]}\u003e\n          \u003cinput name=\"name\" value={state.formData.name.value} ref=\"input\" onChange={this.onInputChange}/\u003e\n        \u003c/Validator\u003e\n        \u003cValidator rules={[{type: 'string', required:true, whitespace:true}]}\u003e\n          \u003cinput name=\"pass\" value={state.formData.pass.value}/\u003e\n        \u003c/Validator\u003e\n      {state.formData.name.errors \u0026\u0026 state.formData.name.errors.length ? \u003cdiv ref='error'\u003e{state.formData.name.errors.join(',')}\u003c/div\u003e : null}\n        {state.formData.pass.errors \u0026\u0026 state.formData.pass.errors.length ? \u003cdiv ref='error2'\u003e{state.formData.pass.errors.join(',')}\u003c/div\u003e : null}\n      \u003c/Validation\u003e,container);\n```\n\n## API\n\n### Validation\n\n#### props\n\n\u003ctable class=\"table table-bordered table-striped\"\u003e\n    \u003cthead\u003e\n    \u003ctr\u003e\n        \u003cth style=\"width: 100px;\"\u003ename\u003c/th\u003e\n        \u003cth style=\"width: 50px;\"\u003etype\u003c/th\u003e\n        \u003cth style=\"width: 50px;\"\u003edefault\u003c/th\u003e\n        \u003cth\u003edescription\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eonValidate\u003c/td\u003e\n          \u003ctd\u003eFunction\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003ecalled when validator inside it starts to validate\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\n#### methods\n\n- validate(callback:function): validate all fields, call callback with isValid as parameter\n- reset: reset validation to initial state, used for form reset\n- forceValidate(fields:String[],callback:Function): validate specified fields, call callback with isValid as parameter. fields is component's name which is wrapped by Validator\n\n\n### Validator\n\nValidator 's children must be one component which support trigger handler and value/name prop such as \u003cinput /\u003e\n\n#### props\n\n\u003ctable class=\"table table-bordered table-striped\"\u003e\n    \u003cthead\u003e\n    \u003ctr\u003e\n        \u003cth style=\"width: 100px;\"\u003ename\u003c/th\u003e\n        \u003cth style=\"width: 50px;\"\u003etype\u003c/th\u003e\n        \u003cth style=\"width: 50px;\"\u003edefault\u003c/th\u003e\n        \u003cth\u003edescription\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n          \u003ctd\u003erules\u003c/td\u003e\n          \u003ctd\u003eObject|Array\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003esee https://github.com/yiminghe/async-validator .\n          for example: {type:'string',min:4},[{type:'string',whitespace:true,required:true},{validator:validateFn}] \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003etrigger\u003c/td\u003e\n          \u003ctd\u003eString\u003c/td\u003e\n          \u003ctd\u003eonChange\u003c/td\u003e\n          \u003ctd\u003ewhen to validate\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\n### mixins\n\nValidation.FieldMixin\n\nprovide the following methods:\n\n#### setField\n\nsync individual field which does not need validation\n\n#### handleValidate\n\nused as value for onValidate props of Validation\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## Example\n\nhttp://localhost:8010/examples/\n\nonline example: http://react-component.github.io/form-validation/examples/\n\n## Test Case\n\nhttp://localhost:8010/tests/runner.html?coverage\n\n## Coverage\n\nhttp://localhost:8010/node_modules/rc-server/node_modules/node-jscover/lib/front-end/jscoverage.html?w=http://localhost:8010/tests/runner.html?coverage\n\n## License\n\nrc-form-validation is released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Fform-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-component%2Fform-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Fform-validation/lists"}