API reference > @kontsedal/olas-core > FormErrors
FormErrors type
The errors of a Form<S>, in the schema's shape: string[] | undefined for a field, a nested FormErrors for a nested form, and one entry per item for a field array. Every key is optional.
Signature:
typescript
type FormErrors<S extends FormSchema> = { [K in keyof S]?: S[K] extends Field<any> ? string[] | undefined : S[K] extends Form<infer SS> ? FormErrors<SS> : S[K] extends FieldArray<infer I> ? Array<FieldArrayItemErrors<I> | undefined> : never; };References: FormSchema, Field, Form, FormErrors, FieldArray, FieldArrayItemErrors