Skip to content

Releases: logaretm/vee-validate

v4.10.8

22 Jul 14:25
Compare
Choose a tag to compare

💨 Performance improvement

v4.10.7

16 Jul 22:02
Compare
Choose a tag to compare

🐛 Bug fixes

  • Clone values inserted into field arrays #4372 (9290f5a)
  • Do not warn if the validation is for auto-removed paths #4368 (93f8001)

v4.10.6

08 Jul 17:09
Compare
Choose a tag to compare

✨ Behavior Changes

  • use silent validation when field is initialized closes #4312 (68080d2)

This is because it was causing modal forms to have errors on mounted which confused users. This does not effectively change anything other than you will no longer need to reset the form whenever the modal is shown or when the fields are mounted. If you relied on this behavior then it could be a breaking change for you and you can get it back by enabling validateOnMount or calling validate whenever.

This does not affect initial errors or validateOnMount option.

🐛 Bug Fixes

  • resetForm should cast typed schema values closes #4347 (e9b215a)
  • validate form values on setValues by default closes #4359 (4e11ff9)
  • normalize error paths to use brackets for indices closes #4211 (e354a13)

⚙️ Misc

v4.10.5

03 Jul 23:59
Compare
Choose a tag to compare

🐛 Bug fixes

  • Fixed an issue with defineComponentBinds not adding onBlur binding correctly (6a1dc9b)
  • Fixed an issue with defineComponentBinds not respecting validateOnModelUpdate config #4346 (6a1dc9b)

v4.10.4

03 Jul 23:39
Compare
Choose a tag to compare

👕 TypeScript

  • Avoid using DeepReadOnly type for now with useForm#values since it is too aggressive 2f9ca91

v4.10.3

29 Jun 22:30
Compare
Choose a tag to compare

🐛 Bug Fixes

  • SSR: Avoid referencing window with setTimeout for validation batching #4339 (#4340) thanks to @userquin 🙌
  • Respect model modifiers when emitting the value with useField v-model integration #4333 (c3698f0)

✨ Enhancements

Made object dirty meta checks less strict by treating undefined and missing keys as the same value #4338 (32537e1)

This may cause some differences with the value of dirty meta for forms and object value fields but it shouldn't affect most cases.

v4.10.2

26 Jun 01:50
Compare
Choose a tag to compare

🐛 Bug Fixes

  • defineXXXBinds not respecting validation config events (1660048)

v4.10.1

23 Jun 23:33
Compare
Choose a tag to compare

🐛 Bug Fixes

  • handle NaN when parsing number inputs #4328 (fc41691)
  • reset present values after all path mutation (435e785)
  • resetField() should not validate #4323 (273cca7)

v4.10.0

22 Jun 23:44
Compare
Choose a tag to compare

💣 Breaking Change

Disabled syncVModel by default #4283 (7ce9d67)

A lot of issues created because of this and valid issues and concerns by the community caused by useField auto model tracking causing unexpected behavior for a lot of people. The feature has been disabled by default starting from v4.10.0.

If you relied on useField doing auto modelValue and update:modelValue emitting then you need to turn it on by passing true to syncVModel.

const { ... } = useField('name', undefined, {
 syncVModel: true,
});

Check the discussion in #4283

This makes sense, because it being opt-in makes it less dangerous to cause unexpected behavior.

useForm#values is now readonly #4282 (05d957e)

the values object returned from useForm should have never been treated as mutable and the docs mentioned that a few times and didn't encourage it.

In this release, we mark it as readonly to make it clear to everyone that it should not be mutated directly. The main reason for this design choice is we need to be able to infer the user intent with those mutations. For example, if you clear an array, did you mean to reset the field or did you mean to change its value and trigger a validation?

Being able to infer the user intent is paramount for vee-validate to be able to handle such behaviors correctly, it has always been the case here, and marking it as readonly is just a hint that should've been there from the start.

This should not affect a lot of users.

💅 DX enhancements

  • Allow custom models for defineComponentBinds (bfd6b00)
  • handleBlur can be configured to run validations (d4fafc9)
  • useField#syncVModel also accepts the model prop name (3e4a7c1)
  • Allow multiple messages to be returned in a validator function #4322 #4318 (2cf0eec)

🐛 Bug Fixes

👕 TypeScript

vee-validate v4.10.0 requires [email protected] as it uses many of the newly introduced types to replace its own version of them, this should not affect your experience however it may produce type errors if you relied on some of these internal types. Like MaybeRefOrLazy replaced with MaybeRefOrGetter.

v4.9.6

31 May 20:48
Compare
Choose a tag to compare

🐛 Bug Fixes

👕 TypeScript