mirror of
https://github.com/filamentphp/filament.git
synced 2026-10-28 03:44:19 +08:00
add other null check
This commit is contained in:
@@ -15,7 +15,7 @@ trait CanLimitItemsLength
|
||||
{
|
||||
$this->maxItems = $count;
|
||||
|
||||
$this->rule('array');
|
||||
$this->rule('array', static fn (Component $component): bool => $component->getMaxItems() !== null);
|
||||
$this->rule(static function (Component $component): string {
|
||||
/** @var static $component */
|
||||
$count = $component->getMaxItems();
|
||||
@@ -30,7 +30,7 @@ trait CanLimitItemsLength
|
||||
{
|
||||
$this->minItems = $count;
|
||||
|
||||
$this->rule('array');
|
||||
$this->rule('array', static fn (Component $component): bool => $component->getMinItems() !== null);
|
||||
$this->rule(static function (Component $component): string {
|
||||
/** @var static $component */
|
||||
$count = $component->getMinItems();
|
||||
|
||||
Reference in New Issue
Block a user