open-wc / form-participation

Helper, mixins, tools, and more for supporting your custom elements in participating in an ancestor form.
MIT License
53 stars 7 forks source link

Async custom validators #26

Closed muratcorlu closed 2 years ago

muratcorlu commented 2 years ago

As far as I see currently we are not able to set custom async validators. Do you have a design decision to stick to sync validators or is it just ok for adding async support with a PR?

calebdwilliams commented 2 years ago

Id be good with adding support for a sync validators.

calebdwilliams commented 2 years ago

Adding a sync validator support in #27

calebdwilliams commented 2 years ago

Hey @muratcorlu I've added support for async validators and a blurb about writing your own in the docs. Take a look and let me know what you think. I'm going to sit on this at v0 for a bit longer but want to move it to v1 sooner rather than later, so any feedback would be appreciated.

For now I'm going to close this issue. Any other concerns or questions you have about the feature can go in a new issue. Thanks for bringing up the idea.