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

Make form-validation output valid code #1824

Merged
merged 1 commit into from Jan 6, 2016

Conversation

Projects
None yet
2 participants
@rowanthorpe
Copy link
Contributor

rowanthorpe commented Jan 5, 2016

The form-validation code generates html5 code which doesn't validate as xhtml5 (namely, a missing close-tag and an attribute with no value). This PR fixes that. If you prefer the brevity of vanilla html5 and don't want to cater to the "also valid xml" camp, then feel free to just close this PR (and I will keep it as a custom change for my use, and make a mental note not to submit PRs for any similar changes I might discover in future).

@patrickkettner

This comment has been minimized.

Copy link
Member

patrickkettner commented Jan 6, 2016

Happy to get this in!
However it is not quite valid. You can't nest an a <button> inside of an <input>. the <input> can just be self closing, no?

@rowanthorpe

This comment has been minimized.

Copy link
Contributor Author

rowanthorpe commented Jan 6, 2016

Ah oops. I was just running on automatic when I added the close-tag and didn't even try to grok the surrounding code's intended actions, but of course is a void element [facepalm]. As I presume this has been working fine in non-xml-html5 mode then the xml-equivalent should just be to make the input-tag self-closing (so the just sits before the rather than around/within/connected-to it, yes?). I will update the PR now with that assumption.

@rowanthorpe rowanthorpe force-pushed the rowanthorpe:make-form-validation-output-valid-code branch from 224ba9b to 0eefea2 Jan 6, 2016

patrickkettner added a commit that referenced this pull request Jan 6, 2016

Merge pull request #1824 from rowanthorpe/make-form-validation-output…
…-valid-code

Make form-validation output valid code

@patrickkettner patrickkettner merged commit 080c551 into Modernizr:master Jan 6, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@patrickkettner

This comment has been minimized.

Copy link
Member

patrickkettner commented Jan 6, 2016

cheers!

@rowanthorpe rowanthorpe deleted the rowanthorpe:make-form-validation-output-valid-code branch Jan 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.