Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: add support of [formnovalidate] in Abide #11613

Merged
merged 7 commits into from
Aug 15, 2019

Conversation

SassNinja
Copy link
Contributor

Description

This PR adds formnovalidate support to Abide. Precisely it checks for [type="submit"][formnovalidate] and disables the whole validation if clicked (emulates the native behavior https://www.w3schools.com/tags/att_input_formnovalidate.asp)
In the course of this I've added the method enableValidation that provides an easy way to enable/disable the validation.

Types of changes

  • Documentation
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (anything that would change an existing functionality)
  • Maintenance (refactor, code cleaning, development tools...)

Checklist

  • I have read and follow the CONTRIBUTING.md document.
  • The pull request title and template are correctly filled.
  • The pull request targets the right branch (develop or develop-v...).
  • My commits are correctly titled and contain all relevant information.
  • I have updated the documentation accordingly to my changes (if relevant).
  • I have added tests to cover my changes (if relevant).

Besides I've added an enableValidation method to set isEnabled via JS.
ncoden
ncoden previously requested changes Nov 27, 2018
Copy link
Contributor

@ncoden ncoden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @SassNinja 👋,

Thank you for the pull request!
I have some remarks though regarding of the implementation.

@ncoden ncoden changed the title feat: abide formnovalidate feat: add support for [formnovalidate] in Abide Nov 27, 2018
@ncoden ncoden changed the title feat: add support for [formnovalidate] in Abide feat: add support of [formnovalidate] in Abide Nov 27, 2018
@SassNinja
Copy link
Contributor Author

@ncoden thanks for your review!

I've commented each of your remarks.
When using the feature in the test/visual/abide/text.html it behaves as I would expect.

@ncoden
Copy link
Contributor

ncoden commented Nov 28, 2018

@SassNinja Could you add unit tests after we agreed on the expected behavior of the form at #11613 (review) ? 😄

@ncoden ncoden added the WIP label Nov 30, 2018
@SassNinja SassNinja self-assigned this Jul 25, 2019
@SassNinja SassNinja requested review from kball and DanielRuf August 13, 2019 07:46
@SassNinja SassNinja removed the WIP label Aug 13, 2019
@SassNinja SassNinja dismissed ncoden’s stale review August 13, 2019 07:53

the code has changes in the meantime

Copy link
Contributor

@kball kball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broadly looking good - a couple quick notes/questions but I don't think they block merging.

@SassNinja SassNinja merged commit dcdff56 into foundation:develop Aug 15, 2019
@SassNinja SassNinja deleted the feature/abide-novalidate branch August 15, 2019 07:51
@joeworkman
Copy link
Member

This pull request has been mentioned on Foundation Open Source Community. There might be relevant details there:

https://foundation.discourse.group/t/foundation-for-sites-v6-6-0-is-here-farout/30/1

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

Successfully merging this pull request may close these issues.

abide: provide ability bypass validation on certain submit actions
4 participants