Minimum password length + Static Pages fixes (#11474)

* password min length: server + client side registering

* tweak text, add tests

* misc

* use red border for invalid inputs

* fix auth form for groups

* remove default firefox box shadown on invalid elements

* fix css in authForm

* fix margings

* misc fixes to forms and buttons

* fix typo
This commit is contained in:
Matteo Pagliazzi
2019-10-30 13:47:35 +01:00
committed by GitHub
parent 1cf3ba26b7
commit e1d30eec98
13 changed files with 242 additions and 80 deletions

View File

@@ -93,8 +93,13 @@ async function registerLocal (req, res, { isV3 = false }) {
},
password: {
notEmpty: true,
errorMessage: res.t('missingPassword'),
equals: { options: [req.body.confirmPassword], errorMessage: res.t('passwordConfirmationMatch') },
isLength: {
options: { min: common.constants.MINIMUM_PASSWORD_LENGTH },
errorMessage: res.t('minPasswordLength'),
},
},
});