Skip to content

Commit 08737e6

Browse files
committed
bug #337 Adding a max length validator (weaverryan)
This PR was merged into the 1.0-dev branch. Discussion ---------- Adding a max length validator https://symfony.com/doc/current/doctrine/registration_form.html#registration-password-max Commits ------- 3bfd0e9 Adding a max length validator
2 parents 584289d + 3bfd0e9 commit 08737e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Maker/MakeRegistrationForm.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ private function generateFormClass(ClassNameDetails $userClassDetails, Generator
307307
new Length([
308308
'min' => 6,
309309
'minMessage' => 'Your password should be at least {{ limit }} characters',
310+
// max length allowed by Symfony for security reasons
311+
'max' => 4096,
310312
]),
311313
],
312314
EOF

0 commit comments

Comments
 (0)