This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ Validator::type(\DateTimeInterface::class)->validate(new \DateTime()); // true
3535
3636## Options
3737
38- ### ` constraints `
38+ ### ` constraint `
3939
4040type: ` string ` |` array ` ` required `
4141
@@ -80,8 +80,8 @@ Message that will be shown if input value is not of a specific type.
8080
8181The 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) |
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments