laravel-generator icon indicating copy to clipboard operation
laravel-generator copied to clipboard

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

Open jarkko-hautakorpi opened this issue 2 years ago • 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.

jarkko-hautakorpi avatar Oct 12 '22 16:10 jarkko-hautakorpi

https://github.com/InfyOmLabs/laravel-generator/pull/1046

jarkko-hautakorpi avatar Oct 13 '22 09:10 jarkko-hautakorpi