{"id":13506599,"url":"https://github.com/lewyuburi/nuxt-validate","last_synced_at":"2025-03-30T05:31:12.731Z","repository":{"id":46054675,"uuid":"122011558","full_name":"lewyuburi/nuxt-validate","owner":"lewyuburi","description":"Simple Nuxt input validation module using vee-validate","archived":true,"fork":false,"pushed_at":"2024-01-08T02:15:09.000Z","size":814,"stargazers_count":122,"open_issues_count":24,"forks_count":19,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-22T21:35:51.997Z","etag":null,"topics":["nuxt-module","nuxtjs","validation-library","vee-validate"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/nuxt-validate","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/lewyuburi.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["LewYuburi"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"custom":null}},"created_at":"2018-02-19T02:39:46.000Z","updated_at":"2024-01-08T02:15:19.000Z","dependencies_parsed_at":"2023-09-24T17:56:25.527Z","dependency_job_id":"fe63e95e-a273-4a45-a930-911747c56d38","html_url":"https://github.com/lewyuburi/nuxt-validate","commit_stats":{"total_commits":38,"total_committers":6,"mean_commits":6.333333333333333,"dds":"0.42105263157894735","last_synced_commit":"e1c3a766d29fefa469570ddc01304848c88c5135"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewyuburi%2Fnuxt-validate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewyuburi%2Fnuxt-validate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewyuburi%2Fnuxt-validate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewyuburi%2Fnuxt-validate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lewyuburi","download_url":"https://codeload.github.com/lewyuburi/nuxt-validate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246281099,"owners_count":20752203,"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":["nuxt-module","nuxtjs","validation-library","vee-validate"],"created_at":"2024-08-01T01:00:54.323Z","updated_at":"2025-03-30T05:31:12.349Z","avatar_url":"https://github.com/lewyuburi.png","language":"JavaScript","funding_links":["https://github.com/sponsors/LewYuburi"],"categories":["Uncategorized","JavaScript"],"sub_categories":["Uncategorized"],"readme":"# Deprecated ⚠️\n\nUse [Vee-validate](https://nuxt.com/modules/vee-validate)'s official module instead\n\n# Nuxt Validate\n\n\u003cp\u003e\n  \u003ca href=\"https://www.npmjs.com/package/nuxt-validate\"\u003e\u003cimg src=\"https://badgen.net/npm/dm/nuxt-validate\" alt=\"Downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/nuxt-validate\"\u003e\u003cimg src=\"https://badgen.net/npm/v/nuxt-validate\" alt=\"Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/nuxt-validate\"\u003e\u003cimg src=\"https://badgen.net/npm/license/nuxt-validate\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nNuxt.js module for validations using [Vee-Validate](https://github.com/logaretm/vee-validate)\n\n## Install\n\n```sh\nnpm i --save nuxt-validate\n```\n\n## Usage\n\nAdd module to nuxt.config.js\n\n```js\nmodule.exports = {\n  modules: [\n    ...\n    ['nuxt-validate', {\n      lang: 'es',\n      nuxti18n: {\n        locale: {\n          'zh-CN': 'zh_CN'\n        }\n      }\n      ...\n      // regular vee-validate options\n      // https://github.com/logaretm/vee-validate/blob/master/docs/configuration.md\n    }]\n  ]\n}\n```\n\n### Using top level options\n\n```js\nmodule.exports = {\n  modules: [\n    'nuxt-validate'\n  ],\n  nuxtValidate: {\n    lang: 'es',\n    nuxti18n: {\n      locale: {\n        'zh-CN': 'zh_CN'\n      }\n    }\n  }\n}\n```\n\n### Configuration\n\n#### `lang`\n\n- Default: `undefined`\n\nThe `lang` option accepts the name file placed on the [locale dir](https://github.com/logaretm/vee-validate/tree/main/packages/i18n/src/locale) of Vee-Validate repository without the extension.\n\n#### `rules`\n\n- Default: `undefined`\n\nIf `undefined`, importing all rules.\nWhen listed from [validation-rules](https://logaretm.github.io/vee-validate/api/rules.html#validation-rules), importing it.\n\n```js\nnuxti18n: {\n  rules: ['alpha_dash', 'min']\n}\n```\n\n#### `nuxti18n`\n\n- Default: `undefined`\n\nWhen `nuxti18n` option is set as a `true`, Vee-Validate's locale changes with nuxt-i18n's locale.  \nIf nuxt-i18n's locale and Vee-Validate's [locale](https://github.com/logaretm/vee-validate/tree/master/locale) are different, set `locale` object to convert locale code.\n\n```js\nnuxti18n: {\n  locale: {\n    // nuxt-i18n's locale: Vee-Validate's locale\n    'zh-cn': 'zh_CN',\n    'zh-tw': 'zh_TW'\n  }\n}\n```\n\n:warning: **notice:** If you use nuxt-i18n module, declare the nuxt-validate module at before it.\n\n## Documentation\n\nRead the [official Vee-Validate documentation and demos](https://logaretm.github.io/vee-validate/).\n\n## FAQ\n\n### How to add custom validation methods?\n\nWe recommend using plugins.\n\n`nuxt.config.js`\n\n```js\nmodule.exports = {\n  plugins: [\"~plugins/validate.js\"],\n}\n```\n\n`plugins/validate.js`\n\n```js\nimport { extend } from \"vee-validate\";\n\nextend(\"my-validation\", {\n  message: \"This {_field_} is invalid.\",\n  validate: value =\u003e {\n    // ...\n    return true;\n  }\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewyuburi%2Fnuxt-validate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flewyuburi%2Fnuxt-validate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewyuburi%2Fnuxt-validate/lists"}