Skip to content

Commit 61508d5

Browse files
committed
Auto increment fields should not be required in validator generation
1 parent e9affa9 commit 61508d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PHPFUI/ORM/Tool/Generate/Validator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function getLine(\PHPFUI\ORM\Schema\Field $field) : string
7676
$length = $this->getTypeLength($type);
7777
$validators = [];
7878

79-
if (! $field->nullable)
79+
if (! $field->nullable && ! $field->autoIncrement)
8080
{
8181
$validators[] = 'required';
8282
}

0 commit comments

Comments
 (0)