{"id":16585811,"url":"https://github.com/secundant/reformed","last_synced_at":"2026-06-06T15:31:54.691Z","repository":{"id":65238363,"uuid":"588246139","full_name":"secundant/reformed","owner":"secundant","description":"Forms is business logic","archived":false,"fork":false,"pushed_at":"2023-02-02T19:33:44.000Z","size":1772,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T17:54:32.178Z","etag":null,"topics":["dx","effector","form","forms","reactive","typescript","ux","validation"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/secundant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-12T17:10:12.000Z","updated_at":"2024-08-12T20:53:17.000Z","dependencies_parsed_at":"2023-02-10T11:31:12.523Z","dependency_job_id":null,"html_url":"https://github.com/secundant/reformed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"secundant/product-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secundant%2Freformed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secundant%2Freformed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secundant%2Freformed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secundant%2Freformed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/secundant","download_url":"https://codeload.github.com/secundant/reformed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242159433,"owners_count":20081469,"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":["dx","effector","form","forms","reactive","typescript","ux","validation"],"created_at":"2024-10-11T22:49:39.068Z","updated_at":"2025-03-06T06:27:04.820Z","avatar_url":"https://github.com/secundant.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reformed\n\nForms as business logic.\n\n```tsx\nimport { createHtmlForm } from '@reformed/html';\nimport { Form, useForm } from '@reformed/react';\n\nconst form = createHtmlForm({\n  fields: {\n    login: [\n      '',\n      {\n        required: true\n      }\n    ],\n    password: [\n      '',\n      {\n        required: true\n      }\n    ],\n    comfirmPassword: [\n      '',\n      {\n        required: true\n      }\n    ]\n  },\n  validate: {\n    on: 'submit',\n    fn: ({ password, comfirmPassword }) =\u003e {\n      if (password !== comfirmPassword) {\n        return {\n          comfirmPassword: 'should be equal to password'\n        };\n      }\n    }\n  },\n  submit: {\n    mapParams: omit(['comfirmPassword']),\n    fn: submitFx\n  }\n});\n\nsample({\n  clock: form.submitFailed\n});\nsample({\n  clock: form.submitted,\n  target: HomePage.route.open\n});\n\n// ...\n\nfunction MyForm() {\n  const { register } = useForm(form);\n\n  return (\n    \u003cForm form={form} className=\"space-y-4\"\u003e\n      \u003cFieldLayout label=\"Login\"\u003e\n        \u003cinput {...register('login')} /\u003e\n      \u003c/FieldLayout\u003e\n      \u003cFieldLayout label=\"Password\"\u003e\n        \u003cinput type=\"password\" {...register('password')} /\u003e\n      \u003c/FieldLayout\u003e\n      \u003cFieldLayout label=\"Confirm password\"\u003e\n        \u003cinput type=\"password\" {...register('confirmPassword')} /\u003e\n      \u003c/FieldLayout\u003e\n      \u003cButton type=\"submit\"\u003eLogin\u003c/Button\u003e\n    \u003c/Form\u003e\n  );\n}\n```\n\n\u003e WIP\n\n## Credits\n\nReformed inspired by ...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecundant%2Freformed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecundant%2Freformed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecundant%2Freformed/lists"}