From 8d090438b659b641dd0f6cbc99193f3b48b2fc4b Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Mon, 7 Oct 2019 21:59:40 +0200 Subject: Validation rules: min/max/between: Use string length to compare strings --- tests/Unit/Http/Validation/ValidatorTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/Unit/Http/Validation/ValidatorTest.php') diff --git a/tests/Unit/Http/Validation/ValidatorTest.php b/tests/Unit/Http/Validation/ValidatorTest.php index 450e5d4e..124673df 100644 --- a/tests/Unit/Http/Validation/ValidatorTest.php +++ b/tests/Unit/Http/Validation/ValidatorTest.php @@ -50,9 +50,10 @@ class ValidatorTest extends TestCase )); $this->assertFalse($val->validate( - ['lorem' => 2], - ['lorem' => 'required|min:3|max:10'] + ['lorem' => 'OMG'], + ['lorem' => 'required|min:4|max:10'] )); + $this->assertEquals(['lorem' => ['validation.lorem.min']], $val->getErrors()); $this->assertFalse($val->validate( ['lorem' => 42], ['lorem' => 'required|min:3|max:10'] -- cgit v1.2.3-54-g00ecf