Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: logaretm/vee-validate
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.6.5
Choose a base ref
...
head repository: logaretm/vee-validate
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.6.6
Choose a head ref
  • 3 commits
  • 13 files changed
  • 3 contributors

Commits on Aug 13, 2022

  1. Copy the full SHA
    6ab40df View commit details

Commits on Aug 15, 2022

  1. Copy the full SHA
    0776dc5 View commit details

Commits on Aug 16, 2022

  1. chore(release): publish

    logaretm committed Aug 16, 2022
    Copy the full SHA
    d8ed905 View commit details
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [4.6.6](https://github.com/logaretm/vee-validate/compare/v4.6.5...v4.6.6) (2022-08-16)

### Bug Fixes

* return value if no model modifiers are defined closes [#3895](https://github.com/logaretm/vee-validate/issues/3895) ([#3896](https://github.com/logaretm/vee-validate/issues/3896)) ([6ab40df](https://github.com/logaretm/vee-validate/commit/6ab40df4452c5bee8a487a37164e2273c2aaf0ba))

## [4.6.5](https://github.com/logaretm/vee-validate/compare/v4.6.4...v4.6.5) (2022-08-11)

### Bug Fixes
Original file line number Diff line number Diff line change
@@ -251,7 +251,7 @@ import { useForm } from 'vee-validate';

// keep all values when their fields get unmounted
const { values } = useForm({
keepValueOnUnmount: true,
keepValuesOnUnmount: true,
});
```

2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"packages/*"
],
"npmClient": "yarn",
"version": "4.6.5",
"version": "4.6.6",
"useWorkspaces": true,
"command": {
"version": {
4 changes: 4 additions & 0 deletions packages/i18n/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [4.6.6](https://github.com/logaretm/vee-validate/compare/v4.6.5...v4.6.6) (2022-08-16)

**Note:** Version bump only for package @vee-validate/i18n

## [4.6.5](https://github.com/logaretm/vee-validate/compare/v4.6.4...v4.6.5) (2022-08-11)

**Note:** Version bump only for package @vee-validate/i18n
2 changes: 1 addition & 1 deletion packages/i18n/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vee-validate/i18n",
"version": "4.6.5",
"version": "4.6.6",
"description": "Localization module for VeeValidate",
"author": "Abdelrahman Awad <logaretm1@gmail.com>",
"homepage": "https://vee-validate.logaretm.com/v4/guide/i18n",
4 changes: 4 additions & 0 deletions packages/rules/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [4.6.6](https://github.com/logaretm/vee-validate/compare/v4.6.5...v4.6.6) (2022-08-16)

**Note:** Version bump only for package @vee-validate/rules

## [4.6.5](https://github.com/logaretm/vee-validate/compare/v4.6.4...v4.6.5) (2022-08-11)

**Note:** Version bump only for package @vee-validate/rules
2 changes: 1 addition & 1 deletion packages/rules/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vee-validate/rules",
"version": "4.6.5",
"version": "4.6.6",
"description": "Form Validation for Vue.js",
"author": "Abdelrahman Awad <logaretm1@gmail.com>",
"license": "MIT",
6 changes: 6 additions & 0 deletions packages/vee-validate/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [4.6.6](https://github.com/logaretm/vee-validate/compare/v4.6.5...v4.6.6) (2022-08-16)

### Bug Fixes

* return value if no model modifiers are defined closes [#3895](https://github.com/logaretm/vee-validate/issues/3895) ([#3896](https://github.com/logaretm/vee-validate/issues/3896)) ([6ab40df](https://github.com/logaretm/vee-validate/commit/6ab40df4452c5bee8a487a37164e2273c2aaf0ba))

## [4.6.5](https://github.com/logaretm/vee-validate/compare/v4.6.4...v4.6.5) (2022-08-11)

### Bug Fixes
2 changes: 1 addition & 1 deletion packages/vee-validate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vee-validate",
"version": "4.6.5",
"version": "4.6.6",
"description": "Form Validation for Vue.js",
"author": "Abdelrahman Awad <logaretm1@gmail.com>",
"license": "MIT",
2 changes: 1 addition & 1 deletion packages/vee-validate/src/utils/common.ts
Original file line number Diff line number Diff line change
@@ -235,7 +235,7 @@ export function debounceAsync<TFunction extends (...args: any) => Promise<any>,

export function applyModelModifiers(value: unknown, modifiers: unknown) {
if (!isObject(modifiers)) {
return;
return value;
}

if (modifiers.number) {
47 changes: 45 additions & 2 deletions packages/vee-validate/tests/Form.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineRule } from '@/vee-validate';
import { defineRule, useField } from '@/vee-validate';
import { mountWithHoc, setValue, setChecked, dispatchEvent, flushPromises } from './helpers';
import * as yup from 'yup';
import { computed, onErrorCaptured, reactive, ref, Ref } from 'vue';
import { computed, defineComponent, onErrorCaptured, reactive, ref, Ref } from 'vue';
import { InvalidSubmissionContext } from '../src/types';

describe('<Form />', () => {
@@ -2716,4 +2716,47 @@ describe('<Form />', () => {
expect(inputAt(2).checked).toBe(true);
expect(inputAt(3).checked).toBe(false);
});

// #3895 #3894
test('single checkbox component with v-model in a form', async () => {
const value = ref(false);
const Checkbox = defineComponent({
props: { value: Boolean, modelValue: Boolean },
template: `<input type="checkbox" @change="handleChange" :checked="checked" :value="true" />`,
setup() {
const { handleChange, checked } = useField('field', undefined, {
type: 'checkbox',
uncheckedValue: false,
checkedValue: true,
});

return {
handleChange,
checked,
};
},
});
const wrapper = mountWithHoc({
components: {
Checkbox,
},
setup() {
return {
value,
};
},
template: `
<VForm>
<Checkbox v-model="value" />
</VForm>
`,
});

await flushPromises();
const inputAt = (idx: number) => wrapper.$el.querySelectorAll('input')[idx] as HTMLInputElement;
expect(value.value).toBe(false);
setChecked(inputAt(0), true);
await flushPromises();
expect(value.value).toBe(true);
});
});
4 changes: 4 additions & 0 deletions packages/zod/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [4.6.6](https://github.com/logaretm/vee-validate/compare/v4.6.5...v4.6.6) (2022-08-16)

**Note:** Version bump only for package @vee-validate/zod

## [4.6.5](https://github.com/logaretm/vee-validate/compare/v4.6.4...v4.6.5) (2022-08-11)

**Note:** Version bump only for package @vee-validate/zod
2 changes: 1 addition & 1 deletion packages/zod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vee-validate/zod",
"version": "4.6.5",
"version": "4.6.6",
"description": "vee-validate integration with zod schema validation",
"author": "Abdelrahman Awad <logaretm1@gmail.com>",
"license": "MIT",