{"id":21811506,"url":"https://github.com/dnbard/react-validation-component","last_synced_at":"2025-03-21T09:15:20.557Z","repository":{"id":69792488,"uuid":"141570783","full_name":"dnbard/react-validation-component","owner":"dnbard","description":"Utility component that solves data validation problem with the help of PropTypes","archived":false,"fork":false,"pushed_at":"2018-08-17T11:37:06.000Z","size":645,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-26T05:41:21.115Z","etag":null,"topics":["prop-types","react","reactjs","validation"],"latest_commit_sha":null,"homepage":"","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/dnbard.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":"2018-07-19T11:36:01.000Z","updated_at":"2018-08-17T11:37:07.000Z","dependencies_parsed_at":"2023-04-10T16:50:16.749Z","dependency_job_id":null,"html_url":"https://github.com/dnbard/react-validation-component","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbard%2Freact-validation-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbard%2Freact-validation-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbard%2Freact-validation-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbard%2Freact-validation-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnbard","download_url":"https://codeload.github.com/dnbard/react-validation-component/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244767798,"owners_count":20507110,"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":["prop-types","react","reactjs","validation"],"created_at":"2024-11-27T13:45:13.807Z","updated_at":"2025-03-21T09:15:20.538Z","avatar_url":"https://github.com/dnbard.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![react validation component logo](https://raw.githubusercontent.com/dnbard/react-validation-component/master/public/logo.png)  \n\n[![Build Status](https://travis-ci.org/dnbard/react-validation-component.svg?branch=master)](https://travis-ci.org/dnbard/react-validation-component)\n[![codecov](https://codecov.io/gh/dnbard/react-validation-component/branch/master/graph/badge.svg)](https://codecov.io/gh/dnbard/react-validation-component)\n\n**React Validation Component** is an utility component that solves data validation problem with the help of \"native\" React tool - `prop-types`.\n\nNote: This **library is in development** and `API are going to be changed in the future`!\n\n# Basic Example\n\nJust show me the code!\n\n```js\nimport React, { Component } from 'react';\nimport ReactValidation from 'react-validation-component';\nimport PropTypes from 'prop-types';\n\nclass MyComponent extends Component{\n  constructor(){\n    super();\n\n    this.state = { username: '', age: 0 };\n\n    this.myForm = {\n      username: PropTypes.string.isRequired\n      age: PropTypes.number.isRequired\n    };\n  }\n\n  onFormValidation(errors){\n    // this method are going to be called on every validation\n  }\n\n  render(){\n    const { username, age } = this.state;\n\n    return \u003cform\u003e\n      \u003cReactValidation propTypes={ this.myForm } onValidation={ this.onFormValidation.bind(this) }\u003e{ this.state }\u003c/ReactValidation\u003e\n\n      \u003cinput name=\"username\" value={ username } onChange={ e =\u003e this.setState({ username: e.target.value }) } /\u003e\n      \u003cinput name=\"age\" value={ age } onChange={ e =\u003e this.setState({ age: e.target.value }) } /\u003e\n    \u003c/form\u003e\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnbard%2Freact-validation-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnbard%2Freact-validation-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnbard%2Freact-validation-component/lists"}