Open History to see the last commit
1import type { ServerFormState } from './types'
2β
3interface ServerValidateErrorState<TFormData> {
4 formState: ServerFormState<TFormData>
5}
6β
7export class ServerValidateError<TFormData>
8 extends Error
9 implements ServerValidateErrorState<TFormData>
10{
11 formState: ServerFormState<TFormData>
12β
13 constructor(options: ServerValidateErrorState<TFormData>) {
14 super('Your form has errors. Please check the fields and try again.')
15 this.name = 'ServerValidateError'
16 this.formState = options.formState
17 }
18}