prepareForValidation don't works with arrays with dot notation #32937
Replies: 6 comments 7 replies
-
IMO this should be in the issues section rather than here. |
Beta Was this translation helpful? Give feedback.
-
Any solutions? |
Beta Was this translation helpful? Give feedback.
-
In case anyone is still blocked by this, I resolved this by using For the OP's problem, this can be solved by doing it like this:
It's just a workaround, hopefully we can have a permanent solution to this soon. |
Beta Was this translation helpful? Give feedback.
-
Hi I got a solution for this if anyone wondering how to do alternative without sweating that much.
this set the data into array.
Hopefully, you guys understand me. If there is some issues or security vulnerabilities, please point me out. As far as I know, this one is very appropriate solution I found. |
Beta Was this translation helpful? Give feedback.
-
Here is another solution.
You can do whatever you want with input's data, here is just an exapmle of changing data if the name has dots. |
Beta Was this translation helpful? Give feedback.
-
guys help the database columns are email, phone and the input names are admission_email, admission_phone whenever i submit the form they show as null in the database for some reason. I used to use this method to do this type of thing but it doesn't work anymore am i missing something??
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
I try prepare data for validation using using provided docs: https://laravel.com/docs/7.x/validation#prepare-input-for-validation.
But arrays with dot notation doesn't work as expected.
Steps To Reproduce:
I want override $sender['postal_code'], against that I get new key with proper value.
Beta Was this translation helpful? Give feedback.
All reactions