Level 67
for range_end, you'd probably want to use required_if:range_start instead of just required.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi There,
I've got validation rules looking like:
$this->validate($request, [
'range_start' => 'required|integer',
'range_end' => 'required|integer|gt:range_start,
]);
But when user provides empty value for range_start then instead of 302 redirection back to form with error messages I get status code 500 with InvalidArgumentException saying "The values under comparison must be of the same type".
I don't want to present the user with Error 500 - do You know what should I do with that?
Thx in advance
Paweł
Please or to participate in this conversation.