Démo Formik
This commit is contained in:
@ -105,6 +105,11 @@ class UserController extends Controller
|
||||
if (!isset($projectData['password']) || empty($projectData['password'])) {
|
||||
return new ErrorResponse(1, "You must provide a password");
|
||||
}
|
||||
|
||||
if (mb_strlen($projectData['password']) < 8) {
|
||||
return new ErrorResponse(2, "Your password should have at least 8 characters");
|
||||
}
|
||||
|
||||
$newUser->setPassword($passwordEncoder->encodePassword(
|
||||
$newUser,
|
||||
$projectData['password']
|
||||
|
Reference in New Issue
Block a user