Skip to content

Field level initialValues don't validate before form is touched #296

Description

@shifraHolzer

Are you submitting a bug report or a feature request?

Kudos for a great framework! I'm not sure if this is a bug or expected behavior, but Id like to think this is a bug and thus a feature request.

What is the current behavior?

Field level initialValue values aren't validated until form is touched.

Code Sandbox:
https://codesandbox.io/s/react-final-form-simple-example-lvk4m

What is the expected behavior?

I would have thought that initialValue on the field level would behave the same as the form level initialValues, where the validation happens initially.

For me, this is an issue where I have a form that should pass validation even if the user didn't edit any fields (as the required fields are prepopulated with initialValue values on the field level), but is failing validation because the validation only ran against the form level initialValues.

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