Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 7a89bf2

Browse files
committed
docs: fixed missing null type hint for messages
1 parent 6d1b253 commit 7a89bf2

14 files changed

+17
-17
lines changed

docs/03-rules_choice.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ For example, if `max` is 2, the input array must have at most 2 values.
7878

7979
### `message`
8080

81-
type: `string` default: `The {{ name }} value is not a valid choice, {{ value }} given. Accepted values are: {{ constraints }}.`
81+
type: `?string` default: `The {{ name }} value is not a valid choice, {{ value }} given. Accepted values are: {{ constraints }}.`
8282

8383
Message that will be shown if input value is not a valid choice.
8484

@@ -92,7 +92,7 @@ The following parameters are available:
9292

9393
### `multipleMessage`
9494

95-
type: `string` default: `The {{ name }} value has one or more invalid choices, {{ value }} given. Accepted values are: {{ constraints }}.`
95+
type: `?string` default: `The {{ name }} value has one or more invalid choices, {{ value }} given. Accepted values are: {{ constraints }}.`
9696

9797
Message that will be shown when `multiple` is `true` and at least one of the input array values is not a valid choice.
9898

@@ -106,7 +106,7 @@ The following parameters are available:
106106

107107
### `minMessage`
108108

109-
type: `string` default: `The {{ name }} value must have at least {{ min }} choices, {{ numElements }} choices given.`
109+
type: `?string` default: `The {{ name }} value must have at least {{ min }} choices, {{ numElements }} choices given.`
110110

111111
Message that will be shown when `multiple` is `true` and input array has fewer values than the defined in `min`.
112112

@@ -123,7 +123,7 @@ The following parameters are available:
123123

124124
### `maxMessage`
125125

126-
type: `string` default: `The {{ name }} value must have at most {{ max }} choices, {{ numElements }} choices given.`
126+
type: `?string` default: `The {{ name }} value must have at most {{ max }} choices, {{ numElements }} choices given.`
127127

128128
Message that will be shown when `multiple` is `true` and input array has more values than the defined in `max`.
129129

docs/03-rules_country.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Available options:
4242

4343
### `message`
4444

45-
type: `string` default: `The {{ name }} value is not a valid {{ code }} country code, {{ value }} given.`
45+
type: `?string` default: `The {{ name }} value is not a valid {{ code }} country code, {{ value }} given.`
4646

4747
Message that will be shown if the input value is not a valid country code.
4848

docs/03-rules_each-key.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Validator that will validate each key of an `array` or object implementing `\Tra
3434

3535
### `message`
3636

37-
type: `string` default: `Invalid key: {{ message }}`
37+
type: `?string` default: `Invalid key: {{ message }}`
3838

3939
Message that will be shown if at least one input value key is invalid according to the given `validator`.
4040

docs/03-rules_each-value.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Validator that will validate each element of an `array` or object implementing `
3434

3535
### `message`
3636

37-
type: `string` default: `At key "{{ key }}": {{ message }}`
37+
type: `?string` default: `At key "{{ key }}": {{ message }}`
3838

3939
Message that will be shown if at least one input value element is invalid according to the given `validator`.
4040

docs/03-rules_email.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Validator::email(normalizer: fn($value) => trim($value))->validate('test@example
5656

5757
### `message`
5858

59-
type `string` default: `The {{ name }} value is not a valid email address, {{ value }} given.`
59+
type: `?string` default: `The {{ name }} value is not a valid email address, {{ value }} given.`
6060

6161
Message that will be shown if the input value is not a valid email address.
6262

docs/03-rules_greater-than-or-equal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Can be a `string`, `int`, `float` or `DateTimeInterface` object.
4444

4545
### `message`
4646

47-
type: `string` default: `The {{ name }} value should be greater than or equal to {{ constraint }}, {{ value }} given.`
47+
type: `?string` default: `The {{ name }} value should be greater than or equal to {{ constraint }}, {{ value }} given.`
4848

4949
Message that will be shown if the value is not greater than or equal to the constraint value.
5050

docs/03-rules_greater-than.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Can be a `string`, `int`, `float` or `DateTimeInterface` object.
4444

4545
### `message`
4646

47-
type: `string` default: `The {{ name }} value should be greater than {{ constraint }}, {{ value }} given.`
47+
type: `?string` default: `The {{ name }} value should be greater than {{ constraint }}, {{ value }} given.`
4848

4949
Message that will be shown if the value is not greater than the constraint value.
5050

docs/03-rules_less-than-or-equal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Can be a `string`, `int`, `float` or `DateTimeInterface` object.
4444

4545
### `message`
4646

47-
type: `string` default: `The {{ name }} value should be less than or equal to {{ constraint }}, {{ value }} given.`
47+
type: `?string` default: `The {{ name }} value should be less than or equal to {{ constraint }}, {{ value }} given.`
4848

4949
Message that will be shown if the value is not less than or equal to the constraint value.
5050

docs/03-rules_less-than.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Can be a `string`, `int`, `float` or `DateTimeInterface` object.
4444

4545
### `message`
4646

47-
type: `string` default: `The {{ name }} value should be less than {{ constraint }}, {{ value }} given.`
47+
type: `?string` default: `The {{ name }} value should be less than {{ constraint }}, {{ value }} given.`
4848

4949
Message that will be shown if the value is not less than the constraint value.
5050

docs/03-rules_not-blank.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Validator::notBlank(normalizer: fn($value) => trim($value))->validate(' '); // f
4141

4242
### `message`
4343

44-
type: `string` default: `The {{ name }} value should not be blank, {{ value }} given.`
44+
type: `?string` default: `The {{ name }} value should not be blank, {{ value }} given.`
4545

4646
Message that will be shown if the value is blank.
4747

0 commit comments

Comments
 (0)