ValidationRuleHelper
class ValidationRuleHelper
Finds the validation rule strings the framework splits at "|", where they are written.
The validator splits a string given as one attribute's rules, but never the strings of a
rules array, so ['regex:/a|b/'] keeps its pattern. Data splits strings at any depth,
except one whose rule is a regex.
Constants
| MAP |
Attributes mapped to their rules, as Validator::make() takes them. |
| SET |
One attribute's rules. |
| ANY_OF |
Rule::anyOf()'s alternatives: rules mapped by attribute when keyed, otherwise one set of rules. |
| PROMPT |
A prompt's validate argument: one set of rules, or a keyed array whose first value is one. |
| DATA_MAP |
A Data class's attributes mapped to their rules. |
| DATA_SET |
Data rules, at any depth. |
Methods
Get the argument values the call passes for the given parameter, none when an argument is unpacked.
Report the rule strings in a validation value of the given shape that are split at "|".
Details
at line 88
array
getArgumentValues(array $arguments, array $variants, string $parameter, Scope $scope)
Get the argument values the call passes for the given parameter, none when an argument is unpacked.
at line 117
array
check(Expr $value, string $shape, Scope $scope)
Report the rule strings in a validation value of the given shape that are split at "|".