{"id":20926207,"url":"https://github.com/val-bubbleflat/laravel-vue-validator","last_synced_at":"2025-10-11T15:01:43.797Z","repository":{"id":84848779,"uuid":"95357424","full_name":"val-bubbleflat/laravel-vue-validator","owner":"val-bubbleflat","description":" Simple package to display error in vue from laravel validation","archived":false,"fork":false,"pushed_at":"2019-04-11T06:26:09.000Z","size":8,"stargazers_count":31,"open_issues_count":1,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-16T23:47:07.207Z","etag":null,"topics":["laravel","laravel-validation","validation","validation-library","vue","vuejs"],"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/val-bubbleflat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-06-25T12:08:23.000Z","updated_at":"2025-05-10T21:00:38.000Z","dependencies_parsed_at":"2023-03-02T15:45:39.660Z","dependency_job_id":null,"html_url":"https://github.com/val-bubbleflat/laravel-vue-validator","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.0625,"last_synced_commit":"53fc629feeec584a3beda497cbe0e4df1e7d91bc"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/val-bubbleflat/laravel-vue-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/val-bubbleflat%2Flaravel-vue-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/val-bubbleflat%2Flaravel-vue-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/val-bubbleflat%2Flaravel-vue-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/val-bubbleflat%2Flaravel-vue-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/val-bubbleflat","download_url":"https://codeload.github.com/val-bubbleflat/laravel-vue-validator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/val-bubbleflat%2Flaravel-vue-validator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268800994,"owners_count":24309487,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["laravel","laravel-validation","validation","validation-library","vue","vuejs"],"created_at":"2024-11-18T20:37:14.864Z","updated_at":"2025-10-11T15:01:43.691Z","avatar_url":"https://github.com/val-bubbleflat.png","language":"JavaScript","funding_links":[],"categories":["UI实用程序","Components \u0026 Libraries","UI Utilities","UI Utilities [🔝](#readme)"],"sub_categories":["形成","UI Utilities","Form"],"readme":"# Laravel Vue Validator\n\nBy [bubbleflat.com](https://bubbleflat.com)\n\nThis package allow to display errors from laravel validation rules\n\n! This package needs vue-resource to work !\n\n# Installation\n\n```\nnpm install --save laravel-vue-validator\n```\n\n```javascript\nimport LaravelVueValidator from 'laravel-vue-validator'\n  \nVue.use(LaravelVueValidator)\n```\n\n# Usage Example\n\nIf you have in your laravel validation rule :\n\n  `'name' =\u003e 'required|min:2|max:20'`\n\nYou can display the error using in vue :\n\n  `\u003cerror input=\"name\" /\u003e`\n\nThis error will only be displayed if a 422 error is produced by laravel when the form is submited (when the rule is not satisfied)\n  \nTo flush errors in a vue component: \n\n  `this.$errors.flush()`\n\n# Full Example\n\n```html\n\u003ctemplate\u003e\n\t\u003cinput type='text' v-model='name' /\u003e\n\t\u003c!-- \n\terror do not need v-if,\n\tits content is displayed only if \"name\" has error after validation\"\n\t--\u003e\n\t\u003cerror input=\"name\" /\u003e\n\t\u003cbutton @click=\"submit\"\u003eSubmit\u003c/button\u003e\n\u003c/template\u003e\n\u003cscript\u003e\n\nexport default {\n\n\tdata(){\n\t\treturn{\n\t\t\tname: ''\n\t\t}\n\t},\n\n\tmethods(){\n\t\t// Error are displayed if Laravel backend return 422 Http code with name as error\n\t\tthis.$http.post('/submit', {name: this.name});\n\t}\n\n}\n\n\u003c/script\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fval-bubbleflat%2Flaravel-vue-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fval-bubbleflat%2Flaravel-vue-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fval-bubbleflat%2Flaravel-vue-validator/lists"}