Skip to content

Commit 311197a

Browse files
Update README.md
1 parent f12dc97 commit 311197a

File tree

1 file changed

+69
-47
lines changed

1 file changed

+69
-47
lines changed

README.md

Lines changed: 69 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -26,57 +26,79 @@ return [
2626

2727
<div id="create-rule">
2828

29-
## Available rules (47)
30-
31-
| **Methods** | **Laravel Rule** | **Methods** | **Rule** |
32-
|:-------------------------:|:---------------------:|:-------------------------------:|:---------------------------------:|
33-
| Rule::required() | required | ->startsWith() | starts_with:foo,bar... |
34-
| Rule::nullable() | nullable | ->uppercaseFirstLetter() | new UppercaseFirstLetter() |
35-
| Rule::boolean() | boolean | ->size() | size |
36-
| Rule::rules() | custom rules | ->endsWith() | ends_with:foo,bar |
37-
| ->email() | email | ->doesntStartWith() | doesnt_start_with:foo,bar |
38-
| ->uniqueEmail() | unique:users,email | ->doesntEndWith() | doesnt_end_with:foo,bar |
39-
| ->min() | min | ->in() | in:foo,bar... |
40-
| ->max() | max | ->notIn() | not_in:foo,bar,baz... |
41-
| ->minDigits() | min_digits | ->separateIntegersByComma() | new SeparateIntegersByComma() |
42-
| ->maxDigits() | max_digits | ->separateStringsByComma() | new SeparateStringsByComma() |
43-
| ->integer() | integer | ->separateStringsByUnderscore() | new SeparateStringsByUnderscore() |
44-
| ->numeric() | numeric | ->timezones() | new TimezoneValidation() |
45-
| ->digits() | digits:1 | ->timezoneAsia() | new TimezoneRegionValidation() |
46-
| ->digitsBetween() | digits:1,4 | ->timezoneEurope() | new TimezoneRegionValidation() |
47-
| ->decimal() | decimal | ->timezoneAmerica() | new TimezoneRegionValidation() |
48-
| ->alpha() | alpha | ->timezoneAntarctica() | new TimezoneRegionValidation() |
49-
| ->alphaDash() | alpha_dash | ->timezoneArctic() | new TimezoneRegionValidation() |
50-
| ->alphaNum() | alpha_num | ->timezoneAtlantic() | new TimezoneRegionValidation() |
51-
| ->string() | string | ->timezoneAustralia() | new TimezoneRegionValidation() |
52-
| ->uppercase() | uppercase | ->timezoneIndian() | new TimezoneRegionValidation() |
53-
| ->lowercase() | lowercase | ->timezonePacific() | new TimezoneRegionValidation() |
54-
| ->regex() | regex:pattern | ->lowercaseFirstLetter() | new LowercaseFirstLetter() |
55-
| ->hexColor() | hex_color | | |
56-
| ->json() | json | | |
57-
| ->url() | url or url:http,https | | |
58-
| ->uuid() | uuid | | |
59-
| ->ulid() | ulid | | |
60-
| ->timezone() | timezone | | |
61-
| ->date() | date | | |
62-
| ->dateFormat() | date_format | | |
63-
| ->dateEquals() | date_equals | | |
64-
| ->dateBefore() | before | | |
65-
| ->dateBeforeOrEqual() | before_or_equal | | |
66-
| ->dateAfter() | after | | |
67-
| ->dateAfterOrEqualToday() | after_or_equal:today | | |
68-
| ->dateAfterOrEquals() | after_or_equal | | |
69-
| ->ip() | ip | | |
70-
| ->ipv4() | ipv4 | | |
71-
| ->ipv6() | ipv6 | | |
72-
| ->macAddress() | mac_address | | |
73-
29+
## Available rules
30+
31+
| **Methods** | **Laravel Rule** |
32+
|:-------------------------------:|:---------------------------------:|
33+
| Rule::required() | required |
34+
| Rule::nullable() | nullable |
35+
| Rule::boolean() | boolean |
36+
| Rule::rules() | custom rules |
37+
| ->email() | email |
38+
| ->uniqueEmail() | unique:users,email |
39+
| ->min() | min |
40+
| ->max() | max |
41+
| ->minDigits() | min_digits |
42+
| ->maxDigits() | max_digits |
43+
| ->integer() | integer |
44+
| ->numeric() | numeric |
45+
| ->digits() | digits:1 |
46+
| ->digitsBetween() | digits:1,4 |
47+
| ->decimal() | decimal |
48+
| ->alpha() | alpha |
49+
| ->alphaDash() | alpha_dash |
50+
| ->alphaNum() | alpha_num |
51+
| ->string() | string |
52+
| ->uppercase() | uppercase |
53+
| ->lowercase() | lowercase |
54+
| ->regex() | regex:pattern |
55+
| ->hexColor() | hex_color |
56+
| ->json() | json |
57+
| ->url() | url or url:http,https |
58+
| ->uuid() | uuid |
59+
| ->ulid() | ulid |
60+
| ->timezone() | timezone |
61+
| ->date() | date |
62+
| ->dateFormat() | date_format |
63+
| ->dateEquals() | date_equals |
64+
| ->dateBefore() | before |
65+
| ->dateBeforeOrEqual() | before_or_equal |
66+
| ->dateAfter() | after |
67+
| ->dateAfterOrEqualToday() | after_or_equal:today |
68+
| ->dateAfterOrEquals() | after_or_equal |
69+
| ->ip() | ip |
70+
| ->ipv4() | ipv4 |
71+
| ->ipv6() | ipv6 |
72+
| ->macAddress() | mac_address |
73+
| ->startsWith() | starts_with:foo,bar... |
74+
| ->size() | size |
75+
| ->endsWith() | ends_with:foo,bar |
76+
| ->doesntStartWith() | doesnt_start_with:foo,bar |
77+
| ->doesntEndWith() | doesnt_end_with:foo,bar |
78+
| ->in() | in:foo,bar... |
79+
| ->notIn() | not_in:foo,bar,baz... |
80+
| ->regex() | regex:pattern |
81+
| ->uppercaseFirstLetter() | new UppercaseFirstLetter() |
82+
| ->lowercaseFirstLetter() | new TimezoneRegionValidation() |
83+
| ->separateIntegersByComma() | new SeparateIntegersByComma() |
84+
| ->separateStringsByComma() | new SeparateStringsByComma() |
85+
| ->separateStringsByUnderscore() | new SeparateStringsByUnderscore() |
86+
| ->timezones() | new TimezoneValidation() |
87+
| ->timezoneAsia() | new TimezoneRegionValidation() |
88+
| ->timezoneEurope() | new TimezoneRegionValidation() |
89+
| ->timezoneAmerica() | new TimezoneRegionValidation() |
90+
| ->timezoneAntarctica() | new TimezoneRegionValidation() |
91+
| ->timezoneArctic() | new TimezoneRegionValidation() |
92+
| ->timezoneAtlantic() | new TimezoneRegionValidation() |
93+
| ->timezoneAustralia() | new TimezoneRegionValidation() |
94+
| ->timezoneIndian() | new TimezoneRegionValidation() |
95+
| ->timezonePacific() | new TimezoneRegionValidation() |
7496
</div>
7597

7698

7799
<div id="writing-messages">
78100

79-
### Writing custom messages
101+
### Writing custom rule and message
80102

81103
```php
82104

@@ -92,7 +114,7 @@ class TestRequest extends FormRequest
92114
*/
93115
public function authorize(): bool
94116
{
95-
return true;
117+
return true;
96118
}
97119

98120
public function rules(): array

0 commit comments

Comments
 (0)