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

Conversation

@rowanthorpe
Copy link
Contributor

@rowanthorpe 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
Copy link
Member

@patrickkettner 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?

Loading

@rowanthorpe
Copy link
Contributor Author

@rowanthorpe 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.

Loading

@rowanthorpe rowanthorpe force-pushed the make-form-validation-output-valid-code branch from 224ba9b to 0eefea2 Jan 6, 2016
patrickkettner added a commit that referenced this issue Jan 6, 2016
…-valid-code

Make form-validation output valid code
@patrickkettner patrickkettner merged commit 080c551 into Modernizr:master Jan 6, 2016
2 checks passed
Loading
@patrickkettner
Copy link
Member

@patrickkettner patrickkettner commented Jan 6, 2016

cheers!

Loading

@rowanthorpe rowanthorpe deleted the 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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants