Replies: 1 comment 1 reply
-
You can use the global helper. validator([
'field' => $someValue
], [
'field' => ['numeric', 'between:0,10']
])->passes(); Sure, you would still have to name the field, but there's no |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
The validator has a lot of great rules built into it that can make typical development and checks much easier to reading/writing long if statements for validation
I propose a
once
method to the Validator that allows you to pass a single value and an array/string of rules, the result is a boolean of whether the value passes those rules or not. This could also accept custom Rules as the usual Validator can.Before
After
Beta Was this translation helpful? Give feedback.
All reactions