svelte-forms-lib icon indicating copy to clipboard operation
svelte-forms-lib copied to clipboard

fix: added missing support for generating errors based on yup lazy schema

Open CatchABus opened this issue 2 years ago • 0 comments

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

CatchABus avatar Jul 19 '22 15:07 CatchABus