Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Form] revalidate option is being ignored on blur #4889

Closed
gyuchang opened this issue Jan 5, 2017 · 6 comments
Closed

[Form] revalidate option is being ignored on blur #4889

gyuchang opened this issue Jan 5, 2017 · 6 comments

Comments

@gyuchang
Copy link

gyuchang commented Jan 5, 2017

When a field has an error, the form will be revalidated on blur, even if revalidate option is set to false.

See src/definitions/behaviors/form.js#L323 vs src/definitions/behaviors/form.js#L341

@awgv
Copy link
Member

awgv commented Feb 6, 2017

Hi, please provide a test case as per our contributing guidelines; you can fork this JSFiddle.

@gyuchang
Copy link
Author

gyuchang commented Apr 4, 2017

JSFiddle: http://jsfiddle.net/1mpycce4/

I want the form validation happens only when the form is submitted. With the automatic revalidation on change events, the fields' state and the form's state can appear inconsistent since the field labels turned normal at the revalidation, but the form error message stays unchanged.

With revalidate: false, I can suppress the revalidation on change event, but it still happens on blur

Steps to reproduce.

  1. While both fields are empty, click Button. This will cause the form level error messages to show up and change the fields into the error states.
  2. Click Field 1 and enter a value. Then click Field 2. This will remove the field 1's level error state - meaning the label and input field turn back to normal. If there's onValid handler, it will be fired.

What this means in effect it that the automatic revalidation cannot be turn off completely.

@awgv
Copy link
Member

awgv commented Apr 5, 2017

@gyuchang Your JSFiddle is empty.

@gyuchang
Copy link
Author

gyuchang commented Apr 5, 2017

Sorry, new JSFiddle: http://jsfiddle.net/1mpycce4/

(the previous comment is also updated)

@awgv awgv added this to the Needs Milestone milestone Apr 6, 2017
@stale
Copy link

stale bot commented Feb 23, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 23, 2018
@stale stale bot closed this as completed Mar 25, 2018
@lubber-de

This comment was marked as spam.

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

No branches or pull requests

3 participants