T
TanStack3mo ago
unwilling-turquoise

Validation path params

Will we have validation params like search params in the future, so we don’t need to use beforeLoad? Parsing params is fine, but unlike search validation, it shouldn’t be applied to the URL
2 Replies
complex-teal
complex-teal3mo ago
unclear what you mean. did you see params.parse prop?
unwilling-turquoise
unwilling-turquoiseOP3mo ago
Actually, parseParams only fixes the output you receive in the loader and the like , but it doesn’t update the URL. For example, I want the path to be either A or B, and I give the schema a default of A. If the user types C, I might receive A in my code, but the URL still shows C. In search validation, though, the normalized value is applied to the URL as well.

Did you find this page helpful?