The current method of using use:validators={} precludes being able to use children components in a form with svelte-use-form because you can't actually pass down functions as a prop—and even when the child component directly imports the validator and specifies the use:validators, it doesn't work (presumably because the use:form is in a different component?
It would be great if there was an alternate way of declaring a validator for a field so that we wouldn't have to pass down a function.
This is especially important when each field element has a lot of wrapper/other elements which normally would be wrapped in a component.
If there's already a way to do this, I would love to find out!
The current method of using
use:validators={}
precludes being able to use children components in a form withsvelte-use-form
because you can't actually pass down functions as a prop—and even when the child component directly imports the validator and specifies theuse:validators
, it doesn't work (presumably because theuse:form
is in a different component?It would be great if there was an alternate way of declaring a validator for a field so that we wouldn't have to pass down a function.
This is especially important when each field element has a lot of wrapper/other elements which normally would be wrapped in a component.
If there's already a way to do this, I would love to find out!