Input Attributes That Are Uppercased Get Snaked #38633
Unanswered
omarjebari
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
framework/src/Illuminate/Validation/Concerns/FormatsMessages.php
Line 268 in 65f38f7
If i have an input that is all uppercase i may not want it to get snaked.
For instance i have a csv file with uppercased headings. I'm transforming the csv into a string indexed array and then running validator rules on each entry in the array.
But when errors are found and the message is created my message looks something like this:
The d a t e b r o a d c a s t format is invalid
The input attribute is 'DATE BROADCAST'.
Would it be better to check if the attribute is all uppercased and only if it isn't to snake case it?
Btw i am aware that i can specify a language line for the attribute but i feel that i shouldn't have to do this. Be interested to know everyone's thoughts.
Beta Was this translation helpful? Give feedback.
All reactions