Re: [w3c/webcomponents] Need callback for form submit data (#187)

@tkent-google Thank you for clarifying the scope of the spec and changes. I found it very useful!

I will clarify my previous comments:

> One missing feature is form-validation UI.

Your comment clarified part of this for me. It does handle validation at the form/element level. As well, it offers `:valid`/`:invalid` selectors for styling. 

The only complaint that I still have here is that the UA's validation UI is forced if you want to validate before submit. Using the `novalidate` attribute will disable the UA's validation UI but allows a submission to happen with an invalid form.

> When using <input type=file name=test />, providing a file, it doesn't seem to be passing the file through? (Maybe I'm misunderstanding?)

Sorry, this was more of a question. I was missing the `enctype="multipart/form-data"` on this. 

> When using optional native inputs (<input name=test />) their name seems to be set on the formData even if the field wasn't touched/modified

This was also a question about the expected request when using optional fields. Should the optional field appear in the request? Currently, when using `<input name="test" />` the resulting request has `"test": ""` in the `form` property. I was expecting the optional fields not to be present unless they had values or were modified.

> Not sure it is associated with this feature but enabling the chrome flag (chrome://flags/#enable-experimental-web-platform-features) is causing my lit-elements to break.

This appears to have been fixed. Thanks!

---

Overall, this looks pretty good from what I have tested with my one comment about the UA's validation UI. It would be nice to be able to independently disable the UA's validation UI (without disabling validate on submit) or provide a way to customize the UA's validation UI instead.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/187#issuecomment-474031403

Received on Monday, 18 March 2019 17:55:49 UTC