We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A field of type number that is required is no longer invalid when empty
See the demo below.
A form with 2 inputs, one text and one number, with the required rule on both.
The first field displays the error, the second no. We see this regression across all our applications when bumping to v4.10
<template> <div class="row"> <div class="col-md-6 offset-md-3"> <h1>Sign up</h1> <Form @submit="register($event)"> <Field name="login" rules="required" v-slot="{ field, meta }"> <div> <label for="login">Login</label> <input id="login" v-bind="field" /> </div> </Field> <ErrorMessage name="login" /> <Field name="birthYear" rules="required" v-slot="{ field }"> <div> <label for="birth-year">Birth year</label> <input id="birth-year" type="number" v-bind="field" /> </div> </Field> <ErrorMessage name="birthYear" /> </Form> </div> </div> </template> <script setup lang="ts"> import { ErrorMessage, Field, Form, defineRule, configure } from 'vee-validate'; import { required } from '@vee-validate/rules'; defineRule('required', required); configure({ validateOnInput: true, }); </script>
Vue.js 3.x and vee-validate 4.x
No response
https://stackblitz.com/edit/github-fcvhex?file=package.json,src%2Fcomponents%2FHelloWorld.vue,src%2FApp.vue
The text was updated successfully, but these errors were encountered:
fc41691
Thanks for reporting this, will release a patch today.
Sorry, something went wrong.
v4.10.1 released with the fix.
No branches or pull requests
What happened?
A field of type number that is required is no longer invalid when empty
Reproduction steps
See the demo below.
A form with 2 inputs, one text and one number, with the required rule on both.
The first field displays the error, the second no.
We see this regression across all our applications when bumping to v4.10
Version
Vue.js 3.x and vee-validate 4.x
What browsers are you seeing the problem on?
Relevant log output
No response
Demo link
https://stackblitz.com/edit/github-fcvhex?file=package.json,src%2Fcomponents%2FHelloWorld.vue,src%2FApp.vue
Code of Conduct
The text was updated successfully, but these errors were encountered: