Skip to content

Commit

Permalink
Fix parsing regex validation rules
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Feb 14, 2025
1 parent b821c06 commit 03bc2cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function validate(array $data): void
foreach ($this->rules as $field => $ruleString) {
$rulesArray = explode('|', $ruleString);
foreach ($rulesArray as $rule) {
$ruleParts = explode(':', $rule);
$ruleParts = explode(':', $rule, 2);
$ruleName = $ruleParts[0];
$ruleValue = $ruleParts[1] ?? null;

Expand Down

0 comments on commit 03bc2cb

Please sign in to comment.