remix-validated-form
remix-validated-form copied to clipboard
[Feature]: Types should infer from validator
What is the new or updated feature that you are suggesting?
Just trying v6, and noticed that the types of the form are not sourced from the validator, instead they are from the default values.
And if the validator/default values are mismatched there are no type check errors.
Why should this feature be included?
The validator should be the source of truth for the types, with defaultValues being constrained to those types and the returned form also using the validators type. Otherwise it's very easy for the default values and the scope calls to not match the validator, and have runtime errors.