From 2ff58388a6b08b24e9f204450e0664d82651c863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Fri, 24 May 2024 14:52:27 +0200 Subject: [PATCH] fix Field::required for smallint/bigint --- src/Field.php | 2 ++ tests/FieldTest.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Field.php b/src/Field.php index 76a247515..d13f16669 100644 --- a/src/Field.php +++ b/src/Field.php @@ -178,7 +178,9 @@ public function normalize($value) } break; + case 'smallint': case 'integer': + case 'bigint': case 'float': case 'decimal': case 'atk4_money': diff --git a/tests/FieldTest.php b/tests/FieldTest.php index d6c5d64a8..2e3be5b99 100644 --- a/tests/FieldTest.php +++ b/tests/FieldTest.php @@ -159,7 +159,9 @@ public function testRequiredNumericZeroException(string $type): void */ public static function provideRequiredNumericZeroExceptionCases(): iterable { + yield ['smallint']; yield ['integer']; + yield ['bigint']; yield ['float']; yield ['decimal']; yield ['atk4_money'];