T
TanStack3w ago
ratty-blush

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
robust-apricot
robust-apricot3w ago
unclear what you mean. did you see params.parse prop?
ratty-blush
ratty-blushOP3w 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?