Skip to content

Commit

Permalink
Merge pull request #28 from Invis1ble/fix-27
Browse files Browse the repository at this point in the history
Fixed `minLength` adding, fixes #27.
  • Loading branch information
nacmartin committed Dec 6, 2018
2 parents a4f3a8b + 0f8a64f commit d314437
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Limenius/Liform/Transformer/StringTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ protected function addMaxLength(FormInterface $form, array $schema)
*/
protected function addMinLength(FormInterface $form, array $schema)
{
if ($attr = $form->getConfig()->getOption('attr')) {
if (isset($attr['minlength'])) {
$schema['minLength'] = $attr['minlength'];

return $schema;
}
}

if (null === $this->validatorGuesser) {
return $schema;
}
Expand Down

0 comments on commit d314437

Please sign in to comment.