{"id":22373800,"url":"https://github.com/sajadtorkamani/redux-form-async-validator","last_synced_at":"2026-05-06T07:35:35.005Z","repository":{"id":57350724,"uuid":"145562286","full_name":"sajadtorkamani/redux-form-async-validator","owner":"sajadtorkamani","description":"Easy asynchronous validation of multiple redux-form fields.","archived":false,"fork":false,"pushed_at":"2018-08-22T03:24:30.000Z","size":64,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T19:24:04.730Z","etag":null,"topics":["redux"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/redux-form-async-validator","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/sajadtorkamani.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}},"created_at":"2018-08-21T12:40:08.000Z","updated_at":"2022-05-05T07:52:23.000Z","dependencies_parsed_at":"2022-09-15T01:53:26.433Z","dependency_job_id":null,"html_url":"https://github.com/sajadtorkamani/redux-form-async-validator","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/sajadtorkamani%2Fredux-form-async-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajadtorkamani%2Fredux-form-async-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajadtorkamani%2Fredux-form-async-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajadtorkamani%2Fredux-form-async-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sajadtorkamani","download_url":"https://codeload.github.com/sajadtorkamani/redux-form-async-validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245700469,"owners_count":20658227,"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":["redux"],"created_at":"2024-12-04T21:14:20.942Z","updated_at":"2026-05-06T07:35:34.968Z","avatar_url":"https://github.com/sajadtorkamani.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redux-form-async-validator\n---\n\n`redux-form-async-validator` aims to provide an easy way to perform asynchronous validation on multiple [redux-form](https://github.com/erikras/redux-form) fields.\n\n## Installation\nnpm: `npm install redux-form-async-validator --save`\n\nyarn: `yarn add redux-form-async-validator`\n\n## Usage\nSee below for an example usage:\n```javascript\nimport { composeAsyncValidator } from 'redux-form-async-validator';\n\nconst asyncValidateUsername = /* Some validator */\nconst asyncValidateEmail = /* Some validator */\n\nexport default reduxForm({\n  form: 'some-form',\n  asyncValidate: composeAsyncValidator({\n    username: [asyncValidateUsername, 'Username is not available'],\n    email: [asyncValidateEmail, 'Email is not available']\n  }),\n  asyncChangeFields: ['email', 'username']\n})(YourFormComponent);\n```\n\n## API\n\n#### `composeAsyncValidator (validatorObj: object) -\u003e (asyncValidator: function)`\n\n##### Parameters\n\n`validatorObj: object` (required): An object in which each key corresponds to a field name and each value is an array containing an asynchronous validator function and the error message should the validation fail.\nAll validator functions **must** return a `Promise` -  a resolved promise to indicate successful validation or a rejected promise to indicate a failed validation.\n\n##### Return\n\n`asyncValidator: function`: The resulting validator function uses the provided `validatorObj` to ensure that the correct validator function runs whenever an async field changes. This resulting `asyncValidator` function will be invoked everytime any fields listed in the `asyncChangeFields` prop changes (See the [redux-form docs](https://redux-form.com/7.4.2/examples/asyncchangevalidation/) for more info).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajadtorkamani%2Fredux-form-async-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsajadtorkamani%2Fredux-form-async-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajadtorkamani%2Fredux-form-async-validator/lists"}