InfyOmLabs/laravel-generator

[BUG]: Always print the max:? rule for all string fields

jarkko-hautakorpi opened this issue · 1 comments

v5.4.1
Some rules are generated, but not every time (max:) ? Why does it not always appear for string field.
All rules can be get from Doctrine\DBAL\Schema\AbstractSchemaManager,
$details = $this->schemaManager->listTableDetails($this->tableName);
which will always tell you the string length:
image

In this case string length is 10 so we should have max:10 but this does not appear in models $rules
'account' => 'required|string',
Some fields do have it, but I think it should always be put in string type field rules.