Repository navigation
1.0.7: fix errors stored under key, restore the license, document setErrors - #1
Merged
Merged
Conversation
The first commit of this fork deleted LICENSE. The MIT license requires the copyright notice in all copies, and package.json declares MIT. This restores the original text and adds a line for the fork. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JEDv3tsdEL7sjLdisXuVHA
vee-validate 3 and 4 read the Laravel error format with setErrors, so these versions do not need this package. The README shows the tested examples, the status of the 1.x line, and the known issue in 1.0.4 to 1.0.6: errors are stored under "key" instead of "field", so errors.has() and errors.first() do not find them. It also shows lines that replace the package for vee-validate 2. The license badge now points to LICENSE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JEDv3tsdEL7sjLdisXuVHA
- Nested fields: <ErrorMessage> only finds the bracket form, so the README now uses users[0].email for <Field>, useField and <ErrorMessage>, and passes the Laravel keys to setErrors as they are. - Name which APIs show all messages (useField().errors, errorBag) and which show only the first one. - Say when a field validates again: <Field> on change and blur, not on input. useField on each value change. - An error for a key without a field only stays without a validationSchema, and it keeps meta.valid false. - vee-validate 3: keys must match the vid exactly, with an example. - Known issues of 1.x: 1.0.3 adds no errors, the error bag is cleared for every response with data, and messages must be lists. - Laravel sends the 422 JSON body only for requests that expect JSON. - The status section says that the package is no longer developed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JEDv3tsdEL7sjLdisXuVHA
eslint-config-avidofood 4 needs ESLint 9 and its flat config, so .eslintrc.js goes away. The old config turned off no-unused-vars and no-param-reassign for the whole project. Instead, the unused options parameter of install() is removed, and no-param-reassign only allows the plugin to add its method to Vue.prototype. The new lockfile drops the 24 audit findings of the ESLint 6 chain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JEDv3tsdEL7sjLdisXuVHA
Since 1.0.4, $addLaravelErrors added each error as { key, msg }.
vee-validate 2 finds errors by their field, so errors.has('name') was
false and errors.first('name') was undefined, and templates showed no
message. Commit b45c3fb renamed the loop variable from field to key
but kept "field" in the error object. In 1.0.3 this caused a
ReferenceError, which the try/catch caught, so no error was added.
Commit 4630485 then changed "field" to "key" in the error object. It
must be "field: key".
Tests with Vitest, jsdom, Vue 2.7 and vee-validate 2.2.15 cover the
fix and the other behavior: joined messages, the return value, the
reset of old errors and the null cases. Four of the six tests fail
without the fix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JEDv3tsdEL7sjLdisXuVHA
GitHub Actions runs lint, the tests and npm pack --dry-run on Node 22 and 24 for each push to master and each pull request. Vitest 5 and jsdom 29 need Node.js ^22.13, 24, or 26 and newer. .nvmrc selects Node 24 for local work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JEDv3tsdEL7sjLdisXuVHA
1.0.7 is the last version. It ships the fix for errors under "key", the MIT license and the new README. "files" limits the package to src/, so .eslintrc.js and the new development files stay out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JEDv3tsdEL7sjLdisXuVHA
- CHANGELOG: the development tools need Node.js ^22.13, 24 or 26 and newer. jsdom 29 rejects 22.12, and Vitest 5 rejects 23 and 25. - README: the changelog link points to GitHub, because the package does not contain CHANGELOG.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JEDv3tsdEL7sjLdisXuVHA
pmochine
added a commit
that referenced
this pull request
Oct 8, 2026
master has the merge commit of pull request #1. Its tree equals 1.0.7 (a4e193f), which this branch already contains, so no file changes. After this merge, pull request #2 only shows 2.0.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JEDv3tsdEL7sjLdisXuVHA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
1.0.7 is the last release of the 1.x line (Vue 2, vee-validate 2).
$addLaravelErrorsstored each error underkeyinstead offield. vee-validate 2 finds errors byfield, soerrors.has('name')was false,errors.first('name')was undefined, and templates showed no message. It is nowfield: key.LICENSEwith the original copyright line and a line for the fork. The package ships it again.setErrors(error.response.data.errors)reads the Laravel format. The README shows tested examples for vee-validate 4 and 3, lists the known issues of 1.x, and shows lines that replace the package for vee-validate 2."files": ["src"]..eslintrc.jsleaves the package.Checks
npm ci,npm run lint,npm test: 6 tests pass. 4 of them fail without the fix.npm pack: 4 files (LICENSE,README.md,package.json,src/vee-validate-laravel.js), identical to the repository.After the merge
latestto 1.0.7.1xfrom this state and tag1.0.7there.🤖 Generated with Claude Code
https://claude.ai/code/session_01JEDv3tsdEL7sjLdisXuVHA