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

Form: errorMessage could not reactive display correctly #6905

Closed
ShiinaKin opened this issue Dec 2, 2024 · 0 comments
Closed

Form: errorMessage could not reactive display correctly #6905

ShiinaKin opened this issue Dec 2, 2024 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@ShiinaKin
Copy link

Describe the bug

in followed code, at-least-one is applyed on all fields of form, and if any one of them have value, all errorMsg should disappear.

const schema = yup.object({
  a: yup.string().test('at-least-one', 'must modify one field', function () {
    return !!(this.parent.a || this.parent.b || this.parent.c);
  }),
  b: yup.string().test('at-least-one', 'must modify one field', function () {
    return !!(this.parent.a || this.parent.b || this.parent.c);
  }),
  c: yup.string().test('at-least-one', 'must modify one field', function () {
    return !!(this.parent.a || this.parent.b || this.parent.c);
  }),
});

But Form still display errorMessage. On any one field modify, all test will be executed and return a new val, vee-validation could do it correctly.

Reproducer

https://stackblitz.com/edit/primevue-4-ts-vite-issue-template-yvuggs?file=src%2FApp.vue

PrimeVue version

4.2.4

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

Chrome 131

Steps to reproduce the behavior

  1. submit both form
  2. modify any field of each form
  3. observe error msg diaplay

Expected behavior

No response

@ShiinaKin ShiinaKin added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 2, 2024
@tugcekucukoglu tugcekucukoglu added this to the 4.3.0 milestone Dec 4, 2024
@tugcekucukoglu tugcekucukoglu added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 4, 2024
@mertsincan mertsincan modified the milestones: 4.3.1, 4.3.0 Jan 6, 2025
@github-project-automation github-project-automation bot moved this to Review in PrimeVue Jan 6, 2025
@mertsincan mertsincan self-assigned this Jan 6, 2025
@github-project-automation github-project-automation bot moved this from Review to Done in PrimeVue Jan 9, 2025
@mertsincan mertsincan added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
Status: Done
Development

No branches or pull requests

3 participants