@@ -25,7 +25,6 @@ Validator::count(max: 1)->validate(['a', 'b', 'c']); // false
2525
2626// min and max value
2727Validator::count(min: 2, max: 4)->validate(['a', 'b', 'c']); // true
28-
2928// exact value
3029Validator::count(min: 3, max: 3)->validate(['a', 'b', 'c']); // true
3130```
@@ -34,10 +33,10 @@ Validator::count(min: 3, max: 3)->validate(['a', 'b', 'c']); // true
3433> An ` UnexpectedValueException ` will be thrown when either ` min ` or ` max ` options are not given.
3534
3635> [ !NOTE]
37- > An ` UnexpectedValueException ` will be thrown when the input value is not an ` array ` or an object implementing ` \Countable ` .
36+ > An ` UnexpectedValueException ` will be thrown when the ` min ` value is greater than the ` max ` value .
3837
3938> [ !NOTE]
40- > An ` UnexpectedValueException ` will be thrown when the ` min ` value is greater than the ` max ` value .
39+ > An ` UnexpectedValueException ` will be thrown when the input value is not an ` array ` or an object implementing ` \Countable ` .
4140
4241## Options
4342
@@ -47,16 +46,12 @@ type: `?int` default: `null`
4746
4847It defines the minimum number of elements required.
4948
50- For example, if ` min ` is 2, the input value must have at least 2 elements.
51-
5249### ` max `
5350
5451type: ` ?int ` default: ` null `
5552
5653It defines the maximum number of elements required.
5754
58- For example, if ` max ` is 2, the input value must have at most 2 elements.
59-
6055### ` minMessage `
6156
6257type: ` ?string ` default: ` The {{ name }} value should contain {{ min }} elements or more, {{ numElements }} elements given. `
0 commit comments