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

Suppress HTML5 form validation #25

Closed
serkandurusoy opened this issue Jun 14, 2016 · 1 comment
Closed

Suppress HTML5 form validation #25

serkandurusoy opened this issue Jun 14, 2016 · 1 comment
Assignees
Labels
Type: Feature New features and feature requests

Comments

@serkandurusoy
Copy link
Contributor

Currently, uniforms begins validation only with the initial submit.

But, HTML5 form validation (for fields like number, email, date etc) supersedes the form submit handling in such a way that it is called before the first submit gets fired.

This results in native browser validation messages appearing.

After the first submit, uniforms takes over the validation, no longer displaying native browser messages.

To mitigate this issue, we could perhaps simply suppress HTML5 form validation all together.

Editing line 150 of BaseForm.js from

<form {...this.getNativeFormProps()} />

to

<form {...this.getNativeFormProps()} novalidate />

should suffice.

@radekmie
Copy link
Contributor

I don't think it should be mandatory - default prop: novalidate: true should suffice.

@radekmie radekmie self-assigned this Jun 14, 2016
@radekmie radekmie added the Type: Feature New features and feature requests label Jun 14, 2016
@Monteth Monteth added this to Closed in Open Source (migrated) Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New features and feature requests
Projects
Archived in project
Development

No branches or pull requests

2 participants