Replies: 1 comment
-
Hi @TheAndrey, you will want to take a look at the If you are using a form request, you may use the If you are manually creating a validator, you can call the |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Laravel Version
10.16.1
PHP Version
8.1.21
Database Driver & Version
No response
Description
Hi,
This is not the first time I have encountered unsatisfactory validation work.
I changed the name of the current password entry field as follows, which anyone can do using the developer tools in the browser:
I use the following validation rule:
When submitting a form, an error occurs in the
current_password
rule, despite the fact that it is preceded by a rule prohibiting accepting an array.My suggestion
Processing of the chain of rules (from left to right) of each field should be interrupted as soon as one of the rules returns an error.
I am faced with this problem every time I write my rules - incorrect input comes into them, despite the presence of rules prohibiting it in front of him. I have to write extra logic for checking the received value types.
Processing input arrays is a Laravel sore spot... 😵
#47913
Steps To Reproduce
Modify the password input field so that it sends an array.
Beta Was this translation helpful? Give feedback.
All reactions