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
* There is no need to set meta titles for every controller method. The package can optionally guess titles based on uri segments or the current named route
Ensure the passed attribute is a valid base 64 encoded string.
53
+
54
+
### `Coordinate`
55
+
56
+
Ensure the passed attribute is a valid comma separated Latitude and Longitude string. For example: `51.507877,-0.087732`.
57
+
58
+
### `DomainRestrictedEmail`
59
+
60
+
Ensure the passed email in question is part of the provided whitelist of domains.
61
+
62
+
For instance, to ensure the given email domain is `f9web.co.uk` or `laravel.com`:
63
+
64
+
```php
65
+
use F9Web\ValidationRules\Rules\DomainRestrictedEmail;
66
+
67
+
// ...
68
+
69
+
$request->validate([
70
+
'email' => [
71
+
'required',
72
+
(new DomainRestrictedEmail())->validDomains([
73
+
'f9web.co.uk',
74
+
'laravel.com',
75
+
]),
76
+
],
77
+
]);
78
+
```
79
+
80
+
The validation message will include the list of whitelisted domains based upon the provided configuration.
81
+
82
+
### `EvenNumber`
83
+
84
+
Ensure the passed attribute is an even number.
85
+
86
+
### `ExcludesHtml`
87
+
88
+
Ensure the passed attribute does not contain HTML.
89
+
90
+
### `HexColourCode`
91
+
92
+
Ensure the passed attribute is a valid hex colour code (three of six characters in length), optionally validating the presence of the `#` prefix.
93
+
94
+
Minimum usage example to validate a short length code with the prefix i.e. `#fff`:
95
+
96
+
```php
97
+
use F9Web\ValidationRules\Rules\HexColourCode;
98
+
99
+
(new HexColourCode());
100
+
```
101
+
102
+
Extended usage example to validate a long length code , omitting prefix i.e. `cc0000`:
103
+
104
+
```php
105
+
use F9Web\ValidationRules\Rules\HexColourCode;
106
+
107
+
(new HexColourCode())->withoutPrefix()->longFormat();
108
+
```
109
+
110
+
### `Honorific`
111
+
112
+
Ensure the passed attribute is a valid honorific, omitting appended dots. The list of valid honorifics is available [here](src/Support/Honorifics.php).
0 commit comments