Skip to content

[WIP] [FEAT] Allow returning anything in a validator, not just a string #1188

[WIP] [FEAT] Allow returning anything in a validator, not just a string

[WIP] [FEAT] Allow returning anything in a validator, not just a string #1188

Triggered via pull request January 9, 2025 10:19
Status Failure
Total duration 2m 59s
Artifacts

pr.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 2 warnings
Test
Type 'FieldApi<{ firstName: string; lastName: string; }, "firstName", undefined, undefined, string, undefined, "A first name is required" | "First name must be at least 3 characters" | undefined, ... 11 more ..., undefined>' is not assignable to type 'FieldApi<any, any, any, any, any, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined>'.
Test
Type 'FieldApi<{ firstName: string; lastName: string; }, "firstName", undefined, undefined, string, undefined, "A first name is required" | "First name must be at least 3 characters" | undefined, ... 11 more ..., undefined>' is not assignable to type 'FieldApi<any, any, any, any, any, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined>'.
Test
Type '({ value }: { value: "test"; fieldApi: FieldApi<{ readonly firstName: "test"; readonly age: 84; }, "firstName", undefined, undefined, "test", any, any, any, any, any, any, any, any, any, any, any, any, any, any>; }) => null' is not assignable to type 'FieldValidateOrFn<{ readonly firstName: "test"; readonly age: 84; }, "firstName", undefined, undefined, "test", undefined> | undefined'.
Test
Type '({ value }: { value: 84; fieldApi: FieldApi<{ readonly firstName: "test"; readonly age: 84; }, "age", undefined, undefined, 84, any, any, any, any, any, any, any, any, any, any, any, any, any, any>; }) => null' is not assignable to type 'FieldValidateOrFn<{ readonly firstName: "test"; readonly age: 84; }, "age", undefined, undefined, 84, undefined> | undefined'.
Test
Type '({ value }: { value: string; fieldApi: FieldApi<Person, "firstName", undefined, undefined, string, any, any, any, any, any, any, any, any, any, any, any, any, any, any>; }) => "Please enter a different value" | undefined' is not assignable to type 'FieldValidateOrFn<Person, "firstName", undefined, undefined, string, undefined> | undefined'.
Test
Type '({ value }: { value: string; fieldApi: FieldApi<Person, "firstName", undefined, undefined, string, any, any, any, any, any, any, any, any, any, any, any, any, any, any>; }) => "Please enter a different value" | undefined' is not assignable to type 'FieldValidateOrFn<Person, "firstName", undefined, undefined, string, undefined> | undefined'.
Test
Type '({ value }: { value: string; fieldApi: FieldApi<Person, "firstName", undefined, undefined, string, any, any, any, any, any, any, any, any, any, any, any, any, any, any>; }) => "Please enter a different value (onChangeError)" | undefined' is not assignable to type 'FieldValidateOrFn<Person, "firstName", undefined, undefined, string, undefined> | undefined'.
Test
Type '({ value }: { value: string; fieldApi: FieldApi<Person, "firstName", undefined, undefined, string, any, any, any, any, any, any, any, any, any, any, any, any, any, any>; }) => "Please enter a different value (onBlurError)" | undefined' is not assignable to type 'FieldValidateOrFn<Person, "firstName", undefined, undefined, string, undefined> | undefined'.
Test
Type '() => Promise<string>' is not assignable to type 'FieldAsyncValidateOrFn<Person, "firstName", undefined, undefined, string, undefined> | undefined'.
Test
Type '() => Promise<string>' is not assignable to type 'FieldAsyncValidateOrFn<Person, "firstName", undefined, undefined, string, undefined> | undefined'.
Preview
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Test
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636