Skip to content
New issue

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

[Enhancement] allow to pass array to validateMode and reValidateMode #33

Open
1 task done
hunterliu1003 opened this issue Aug 10, 2023 · 0 comments · May be fixed by #34
Open
1 task done

[Enhancement] allow to pass array to validateMode and reValidateMode #33

hunterliu1003 opened this issue Aug 10, 2023 · 0 comments · May be fixed by #34
Labels
enhancement New feature or request

Comments

@hunterliu1003
Copy link

Describe the feature

Allow to pass multiple modes to validateMode, for example:

const Comp = defineComponent({
      setup() {
        const { register } = useForm({
          initialValues: {
            name: '',
          },
          validateMode: ['blur', 'change', 'input'],
          validate,
          onSubmit: noop,
        });

        const { value, attrs } = register('name');

        return { value, attrs };
      },
      template: `
        <input v-model="value" v-bind="attrs">
      `,
    });

Allow to pass multiple modes to reValidateMode, for example:

const Comp = defineComponent({
      setup() {
        const { register } = useForm({
          initialValues: {
            name: '',
          },
          reValidateMode: ['blur', 'change', 'input'],
          validate,
          onSubmit: noop,
        });

        const { value, attrs } = register('name');

        return { value, attrs };
      },
      template: `
        <input v-model="value" v-bind="attrs">
      `,
    });

Additional information

  • Would you be willing to help implement this feature?
@hunterliu1003 hunterliu1003 linked a pull request Aug 10, 2023 that will close this issue
4 tasks
@Mini-ghost Mini-ghost added the enhancement New feature or request label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants