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

Dan's avatar
Level 11

4.3 validation errors

So I'm messing around with the dev builds of 4.3 and I'm having some difficulty with validation. I'm trying to use $errors->first('field_name') and $errors->has('field_name') that has worked previously for me with 4.2, but it's not returning anything when I know there is a validation error. Looks to me like using integers starting from 0 and up works, relating to their relative position on the page (hope this makes sense). Is this a new change, or am I doing something wrong?

Also, on a completely different side note which is a problem in itself, my Homestead environment has decided to not show any dubug info when something goes wrong, and just shows a blank page. Anyone else experiencing this?

Cheers in advance!

0 likes
2 replies
JordanDalton's avatar

You can't currently do this in 4.3 using a string as the key name. You can, however, use an integer as the key name.

1 like
Dan's avatar
Level 11

Thought as much, thanks for the reply Jordan!

Please or to participate in this conversation.