Closed brandonsavage closed 2 years ago
Hey @brandonsavage ,
I am going to push this library to support 7.4+. By default, the fields are having hard rule, and if that fails, it was skipping rest of the rules. ie how internally Aura.Filter was working. And I have fixed this via https://github.com/auraphp/Aura.Filter/pull/146.
For the record, this can be fixed via multiple ways in your code. Like adding asStopRule
to each call of cell_number
.
$filter->validate('cell_number')->isNotBlank()->asStopRule();
$filter->validate('cell_number')->is('phoneNumber')->asStopRule();
2
$filter->validate('cell_number')->is('phoneNumber')->asStopRule();
Removing isNotBlank
because by default is not blank will already be called.
By the way do you think we should fix this in 2.x?
I have a set of rules that I have configured:
When I pass an invalid phone number, and a blank password, I expect that the phone number stop rule will prevent processing of the password check. This does not happen. I'm using 2.3.1.