{"id":24511738,"url":"https://github.com/devnax/react-validex","last_synced_at":"2025-09-23T14:19:06.176Z","repository":{"id":112973801,"uuid":"443500691","full_name":"devnax/react-validex","owner":"devnax","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-27T09:44:44.000Z","size":1665,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T00:41:25.397Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devnax.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":"2022-01-01T08:34:14.000Z","updated_at":"2023-07-17T15:23:17.000Z","dependencies_parsed_at":"2023-05-31T19:15:29.567Z","dependency_job_id":null,"html_url":"https://github.com/devnax/react-validex","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/devnax%2Freact-validex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnax%2Freact-validex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnax%2Freact-validex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnax%2Freact-validex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devnax","download_url":"https://codeload.github.com/devnax/react-validex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243713387,"owners_count":20335566,"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":"2025-01-22T00:41:10.668Z","updated_at":"2025-09-23T14:19:01.084Z","avatar_url":"https://github.com/devnax.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-validex\n\n\u003e Fast and simple data validator for React\n\n[![NPM](https://img.shields.io/npm/v/react-validex.svg)](https://www.npmjs.com/package/react-validex) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Install\n\n```bash\nnpm install --save react-validex\n```\n\n## Usage\n\n```jsx\nimport {withValidator, ValidField} from 'react-validex'\n\nconst Form = ({validator}) =\u003e {\n\n  const [state, setState] = useState({\n    user_name: ''\n  })\n\n  useEffect(() =\u003e {\n    validator.validate()\n  }, [state])\n\n  return \u003cdiv\u003e\n    \u003cValidField\n      nameAlias=\"User Name\"\n      name=\"user_name\"\n      value={state.user_name}\n      validator={validator}\n      showError\n      min={6}\n      max={15}\n    \u003e\n      \u003cinput type=\"text\" value={state.user_name} onChange={(e) =\u003e setState({...state, user_name: e.target.value})}/\u003e\n    \u003c/ValidField\u003e\n  \u003c/div\u003e\n}\n\nexport default withValidator(Form)\n```\n\n\n## Props\n\n| Name        | Description                     |\n| ----------- | ------------------------------- |\n| `children`  | `element required`              |\n| `validator` | validator instance `required`   |\n| `name`      | field name `required`           |\n| `value`     | field value `required`          |\n| `showError` | show the error bellow `boolean` |\n\n\n\n\u003e Please follow the [validex](https://www.npmjs.com/package/validex) for the validator props","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevnax%2Freact-validex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevnax%2Freact-validex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevnax%2Freact-validex/lists"}