svelte-forms-lib
svelte-forms-lib copied to clipboard
fix: added missing support for generating errors based on yup lazy schema
There is the case of a lazy validation schema. In that case, fields needed for errors can only be retrieved if schema's builder
method is called.
Lazy schema definition according to yup:
interface SchemaLazyDescription {
type: string;
label?: string;
meta: object | undefined;
}
See how lazy schemas work in yup API docs: https://github.com/jquense/yup#lazyvalue-any--schema-lazy