Skip to content

Commit c1f4683

Browse files
authored
fix Validation
1 parent ef441aa commit c1f4683

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

App/Models/Validation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ private function executeRule(string $field, string $ruleName, array $params): bo
6868
return filter_var($value, FILTER_VALIDATE_EMAIL) !== false;
6969
case 'number':
7070
return is_numeric($value);
71-
case 'regex':
72-
return preg_match($params[0], $value) === 1;
7371
case 'url':
7472
return filter_var($value, FILTER_VALIDATE_URL) !== false;
73+
case 'regex':
74+
return preg_match($params[0], $value) === 1;
7575
// Add more validation rules as needed
7676
default:
7777
return false;

0 commit comments

Comments
 (0)