Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mstnorris's avatar

Validate the query string

Is it possible to validate the query string?

We have a number of GET routes used for components, mostly searching and filtering, and we'd like to validate the provided input. For example, that the currency ISO code exists in the database.

example.com/some/route/that/returns/data?currency=GBP

0 likes
1 reply
sutherland's avatar

I think you should be able to validate GET routes just like you would a POST.

Please or to participate in this conversation.