Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

$form.valid is false when async error appears on any form field #1224

Open
NNSTH opened this issue May 25, 2020 · 0 comments
Open

$form.valid is false when async error appears on any form field #1224

NNSTH opened this issue May 25, 2020 · 0 comments

Comments

@NNSTH
Copy link

NNSTH commented May 25, 2020

The Problem

We use this package for a lot of forms, managed it very well, but still stacked with this issue: when we try to enable / disable "submit" button according to form validation state- $form.valid is false although no client errors appear, only server error (that we added via "asyncSetValidation").
is there any way to make a difference between "client valid" and "server valid"?

Steps to Reproduce

  1. Create a form using RRF
  2. Use simple Field component, and use client validation like "required".
  3. add onSubmit validation and use asyncSetValidation to raise server validation error.
  4. Fill in this field so required will not raise client error.

Expected Behavior

$form.valid is true

Actual Behavior

$form.valid is false

Reproducible Code Example

(please fork from this CodePen template or this CodeSandbox template)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant