observablehq / inputs

Better input elements
https://observablehq.com/framework/lib/inputs
ISC License
127 stars 34 forks source link

Is there a way to incorporate an asynchronous validation function specifically for the Inputs.text feature? #250

Closed kasivisu4 closed 1 year ago

kasivisu4 commented 1 year ago

The validation function of inputs.text fails when the validation function is an async function. I have reproduced the issue here

mootari commented 1 year ago

I believe that works as designed. I recommend to reframe it as a feature request.

kasivisu4 commented 1 year ago

Oh makes sense @mootari. Thanks, I will update it as feature

mbostock commented 1 year ago

Input validation has to be synchronous. You can’t defer validation because you can’t delay the propagation of events when the input changes.