You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9da8334
Browse filesBrowse the repository at this point in the historyBrowse files
A single rule can be applied to multiple fields.<br>
96
+
A same rule can be applied to multiple fields. It is called a **global rule**.<br>
97
97
It is useful to avoid repeating the same rule, for example in the case of several fields are required.
98
98
99
-
These “global rules” are applied to each field until calling `breakRule` function.<br>
99
+
A global rule will be applied to each field until calling `endGlobalRule` function.<br>
100
100
101
101
There are two type of rules: 'and' and 'or'.
102
102
103
103
##### 'and' rule
104
104
105
-
An 'and' rule is applied to each field added after declaring it.
105
+
An 'and' rule is applied to each field added after declaring it.<br>
106
+
It is the default type of rule.
106
107
107
108
```php
108
-
$validator->ruleUntilBreak($rule);
109
+
$validator->globalRule($rule);
109
110
```
110
111
111
112
##### 'or' rule
@@ -114,18 +115,18 @@ An 'or' rule will pass if at least one of the fields added after declaring it pa
114
115
It is typically used with `\Validation\Required`, when at least one of X fields must be filled (for example, at least the user landline or mobile phone number).
0 commit comments