Skip to content

issue: yup resolver early validation when using .min() on array #802

@LightSkyLiam

Description

@LightSkyLiam

Version Number

5.2.0

Codesandbox/Expo snack

https://lightskyliam.github.io/yup-early-validation-issue/

Steps to reproduce

  1. Go to https://lightskyliam.github.io/yup-early-validation-issue/
  2. or clone the following github repo: https://github.com/LightSkyLiam/yup-early-validation-issue and run locally
  3. Click on upload file
  4. delete the files
  5. Re-upload the files
  6. error message for the first schema (the bugged one) is showing even before user interacted with the form at all

Expected behaviour

as in the workingSchema, the error message shows only when the user interacts with the form and creates an error (in my case, deleting the value for a required field.

Example Video

Image

What browsers are you seeing the problem on?

Edge, Chrome

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions