why isn't array validation working? #1028
-
Although I just got FormRequest validation working I was meanwhile experimenting with array validation and, for reasons unclear to me, it isn't working. Here's my code:
None of these rule are validating. Like I performed the update CRUD operation after deleting the first name field and I received no errors what-so-ever despite that field being required and not nullable. Since FormRequest is working this isn't all that important but none-the-less it's now a point of curiosity for me. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hello @prescriptionlifeline as i understand you are handle this rules in Controller. Can you share your controller code to check how is setup. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Did you was abble to solve this? if you still need assistant please share the code to check the validation rules. Cheers. |
Beta Was this translation helpful? Give feedback.
-
Good to know, so i will close the issue, but please feel free to re-open or create a new one if needed. Cheers. |
Beta Was this translation helpful? Give feedback.
The issue was that I wasn't inheriting the
$rules
variable from the parent scope. So like instead of doing this:I should have been doing this: