Content-Length: 298865 | pFad | https://github.com/jquery-validation/jquery-validation/pull/2493

50 Core: Add support for Web Components by dhobi · Pull Request #2493 · jquery-validation/jquery-validation · GitHub
Skip to content

Core: Add support for Web Components #2493

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

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

dhobi
Copy link
Contributor

@dhobi dhobi commented Jun 26, 2024

Checklist for this pull request

Description

This PR tries to add validation support for custom elements (Web Components). See #2492 for a first technical analysis.

It's possible that the current implementation is not good enough. Especially the part where I added the customElements to both, the "focusin.validate focusout.validate keyup.validate" events and to the "click.validate" events. Maybe we would need to try to differ there or we should go with "more settings value" mentioned in #2492 approach?

@bytestream
Copy link
Member

This looks OK to me.

It's possible that the current implementation is not good enough.

Why? The way you've done it would be my preference over several settings.

@bytestream bytestream linked an issue Jun 28, 2024 that may be closed by this pull request
@bytestream bytestream changed the title Core: Added support for Web Components. Fixes #2492 Core: Add support for Web Components Jun 28, 2024
@dhobi
Copy link
Contributor Author

dhobi commented Jun 28, 2024

Why? The way you've done it would be my preference over several settings.

I was thinking because customElements are now listening to both event types: "focusin.validate focusout.validate keyup.validate" but also to "click.validate" instead of just either one of them. The only reliable way to "split" imo would be to make it configurable by the user (therefore the single vs multiple config entries dilemma).
If we just say that web components will always listen for all events, that would be fine for me as well. It's just a decision in the end 😄

@bytestream bytestream merged commit 75f5123 into jquery-validation:master Jun 28, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate Web Components
2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/jquery-validation/jquery-validation/pull/2493

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy