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
Copy file name to clipboardExpand all lines: content/1.getting-started/5.strategies.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,3 +43,17 @@ $faker = new Faker();
43
43
$faker->regex('/^01$/')->postalCode(); // Postal code that begins with '01'
44
44
$faker->regex('/.com$/')->email(); // Email that ends with '.com'
45
45
```
46
+
47
+
## Valid
48
+
49
+
The valid strategy allows you to filter generated values using a custom validation callable. The callable must accept one parameter (the generated value) and return a boolean indicating whether the value is valid or not.
0 commit comments