Skip to content

issue: incorrect validation flow #9659

@ilteoood

Description

@ilteoood

Version Number

7.41.0

Codesandbox/Expo snack

https://codesandbox.io/s/magical-dust-n1nor5?file=/src/App.tsx

Steps to reproduce

Using mode onChange:

  1. Change the input from 0 to any string, like foo
  2. The button will be enabled, until you lose the focus on the input
  3. Change again the value of the input from foo to 1
  4. In this case the button will be immediately enabled, without losing the focus

Using mode all:

  1. Change the input from 0 to any string
  2. The button will always be enabled

Expected behaviour

Using mode onChange:

  1. Change the input from 0 to any string, like foo
  2. The button will be immediately disabled

Using mode all:

  1. Change the input from 0 to any string
  2. The button will be immediately disabled

What browsers are you seeing the problem on?

Firefox, Chrome

Relevant log output

No response

Code of Conduct

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions