Make form-validation output valid code #1824

Merged
merged 1 commit into from Jan 6, 2016

Projects

None yet

2 participants

@rowanthorpe
Contributor

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
Member

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
Contributor

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 Make form-validation output valid code
0eefea2
@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
Member

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