Skip to content

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

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

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

Triggered via pull request January 11, 2025 09:31
Status Failure
Total duration 3m 34s
Artifacts

pr.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 2 warnings
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, ... 4 more ..., undefined>; }) => 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, undefined>; }) => 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, undefined>; }) => "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, undefined>; }) => "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, undefined>; }) => "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, undefined>; }) => "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'.
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