{"id":19354632,"url":"https://github.com/nosachamos/formalizer","last_synced_at":"2025-04-23T08:31:51.289Z","repository":{"id":34977700,"uuid":"193383632","full_name":"nosachamos/formalizer","owner":"nosachamos","description":"React hooks based form validation made for humans.","archived":false,"fork":false,"pushed_at":"2023-03-01T02:51:18.000Z","size":1761,"stargazers_count":13,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T06:10:54.045Z","etag":null,"topics":["awesome","form","form-validation","form-validator","hook","just-works","react-hooks","usable","validation"],"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/nosachamos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-23T18:44:25.000Z","updated_at":"2024-12-20T05:34:38.000Z","dependencies_parsed_at":"2023-01-15T11:20:52.392Z","dependency_job_id":null,"html_url":"https://github.com/nosachamos/formalizer","commit_stats":null,"previous_names":[],"tags_count":77,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nosachamos%2Fformalizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nosachamos%2Fformalizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nosachamos%2Fformalizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nosachamos%2Fformalizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nosachamos","download_url":"https://codeload.github.com/nosachamos/formalizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250399503,"owners_count":21424194,"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":["awesome","form","form-validation","form-validator","hook","just-works","react-hooks","usable","validation"],"created_at":"2024-11-10T05:02:51.282Z","updated_at":"2025-04-23T08:31:51.282Z","avatar_url":"https://github.com/nosachamos.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/nosachamos/formalizer.svg?branch=master)](https://travis-ci.com/nosachamos/formalizer)\n[![codecov](https://codecov.io/gh/nosachamos/formalizer/branch/master/graph/badge.svg)](https://codecov.io/gh/nosachamos/formalizer)\n\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n![npm](https://img.shields.io/npm/v/formalizer.svg)\n![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/nosachamos/formalizer.svg)\n![GitHub](https://img.shields.io/github/license/nosachamos/formalizer.svg)\n\nFormalizer is a React Hooks based form validation library made for humans. The cleanest code or your money back ;)\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/nosachamos/formalizer/raw/master/docs/logo.png\" alt=\"Formalizer\" style=\"max-width:100%;\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003eSimple, tiny, extensible, intuitive, documented, fully tested, magical.\u003c/p\u003e\n\n\u003cbr/\u003e\n\n\n# Installation\n\n```sh\nyarn add formalizer\n```\n\nor\n\n```sh\nnpm install formalizer --save\n```\n\n# Sample Usage\n\n```jsx\nimport { useFormalizer } from 'formalizer';\n\nconst UserProfileComponent = () =\u003e {\n  const { formRef, useInput, errors, isValid } = useFormalizer();\n\n  return (\n    \u003cform ref={formRef}\u003e\n      \u003cinput {...useInput('name', ['isRequired'])} /\u003e\n      \u003cspan\u003e{errors['name']}\u003c/span\u003e\n\n      \u003cinput {...useInput('email', ['isRequired', 'isEmail'])} /\u003e\n      \u003cspan\u003e{errors['email']}\u003c/span\u003e\n\n      \u003cbutton disabled={!isValid} type=\"submit\"\u003e\n        Submit\n      \u003c/button\u003e\n    \u003c/form\u003e\n  );\n};\n```\n\nFor a complete guide on how each of these pieces work, see our [tutorial](docs/tutorial.md).\n\n# In a Nutshell\n\nUse the `useFormalizer` hook to gain access to the `useInput` hook, the errors currently in your form, whether the form is valid or not [and more](docs/useformalizer-hook.md).\n\nThen, use the `useInput` to [setup validations](docs/examples.md) on your form inputs.\n\nFormalizer offers two [built in validators](docs/builtin-validators.md) out-of-the-box and it integrates with the awesome [validator](https://www.npmjs.com/package/validator) library seamlessly, which means if you install it [you can use all of their validators](docs/third-party-validators.md).\n\nBut know that writing your own [custom validators](docs/custom-validators.md) is super easy.\n\nAlso, you may create [global validators](docs/global-validators.md) so that they accessible throughout your app. Doing so helps keep your code DRY and facilitates maintaining it.\n\nFinally, if you use [Material UI](https://material-ui.com/) you may like the fact Formalizer [integrates](docs/material-ui.md) with it. If you use some other UI framework, chances are you can tweak our [settings](docs/settings.md) to make it work with it.\n\n# Contributing\n\nContributions are very welcome!\n\nWe follow the \"fork-and-pull\" Git workflow.\n\n1. **Create a Fork and clone it**\n\n   Simply click on the “fork” button of the repository page on GitHub.\n\n   The standard clone command creates a local git repository from your remote fork on GitHub.\n\n2. **Modify the Code**\n\n   In your local clone, modify the code and commit them to your local clone using the git commit command.\n\n   Run `yarn test` and make sure all tests still pass.\n\n   Run `tslint --project .` and make sure you get no warnings.\n\n3. **Push your Changes**\n\n   Make sure to update affected tests and/or add tests to any new features you may have created.\n\n   We are very careful to make sure coverage does not drop.\n\n4. **Create a Pull Request**\n\n   We will review your changes and possibly start a discussion.\n\n   If changes are required, you can simply push these changes into your fork by repeating steps #3 and #4 and the pull request is updated automatically.\n\n## License\n\nMIT\n\n---\n\nCreated and maintained by **[`Eduardo Born`](http://github.com/nosachamos)** with ❤ and coffee\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnosachamos%2Fformalizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnosachamos%2Fformalizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnosachamos%2Fformalizer/lists"}