Open Przemoo16 opened 7 months ago
Thank you for reporting this issue. I will look into it in the next few days. If there is a problem with Qwik v1.3.0, I recommend downgrading as a workaround.
Alternatively, you can also use a Valibot schema for validation: https://modularforms.dev/qwik/guides/validate-your-fields#schema-validation
I am not sure why TypeScript stopped resolving types the correct way. As a workaround, you can define the correct type yourself:
required<string>('This field is required')
The custom$
also required explicit type, as typescript somehow cannot inference it.
Yes, there was probably a change somewhere in the Qwik code that now breaks some type inferences. I will be investigating this in the next few weeks.
After updating Qwik to 1.3.0, the
required
validator throws the typescript error:Type 'QRL<(value: Value<undefined>) => string>' is not assignable to type 'QRL<ValidateField<string>>'.ts(2322)
Code to reproduce: