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

Commit 2ec5740

Browse files
committed
fix: wrong Type argument name
1 parent 1187adc commit 2ec5740

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

docs/03x-rules-type.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Validator::type(\DateTimeInterface::class)->validate(new \DateTime()); // true
3535
3636
## Options
3737

38-
### `constraints`
38+
### `constraint`
3939

4040
type: `string`|`array` `required`
4141

@@ -80,8 +80,8 @@ Message that will be shown if input value is not of a specific type.
8080

8181
The following parameters are available:
8282

83-
| Parameter | Description |
84-
|---------------------|---------------------------|
85-
| `{{ value }}` | The current invalid value |
86-
| `{{ name }}` | Name of the invalid value |
87-
| `{{ constraints }}` | The valid type(s) |
83+
| Parameter | Description |
84+
|--------------------|---------------------------|
85+
| `{{ value }}` | The current invalid value |
86+
| `{{ name }}` | Name of the invalid value |
87+
| `{{ constraint }}` | The valid type(s) |

src/ChainedValidatorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function range(
6666
public function rule(RuleInterface $constraint): ChainedValidatorInterface;
6767

6868
public function type(
69-
string|array $constraints,
69+
string|array $constraint,
7070
string $message = 'The "{{ name }}" value should be of type "{{ constraint }}", "{{ value }}" given.'
7171
): ChainedValidatorInterface;
7272
}

src/StaticValidatorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static function range(
5656
public static function rule(RuleInterface $constraint): ChainedValidatorInterface;
5757

5858
public static function type(
59-
string|array $constraints,
59+
string|array $constraint,
6060
string $message = 'The "{{ name }}" value should be of type "{{ constraint }}", "{{ value }}" given.'
6161
): ChainedValidatorInterface;
6262
}

0 commit comments

Comments
 (0)