Skip to content

useForm new parameter for formIsValid #70

@Gene-Garcia

Description

@Gene-Garcia

The formIsValid function has the responsibility to determine if the passed submitFunction will be called or not.

  1. Iterates through VALUES and checks if all are not empty.
  2. Iterates through ERRORS and checks if all are empty.

The problem is that not all consumers of useForm require every input field, some allow the form to be submitted with some input fields empty. Passing formIsValid as a parameter will bypass this problem

However, it will have an arbitrary value/function which is the checking of values and errors. Consumers that do not want every input field to be required will pass a value/function to formIsValid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions