Allow spaces in password

This commit is contained in:
Beaudan 2018-12-11 13:28:25 +11:00
parent a1255dd31e
commit 415d0858e8

View file

@ -20,7 +20,7 @@ const validatePassword = (phrase, i18n) => {
}
// Restrict characters to letters, numbers and symbols
const characterRegex = /^[a-zA-Z0-9-!()._`~@#$%^&*+=[\]{}|<>,;:]+$/
const characterRegex = /^[a-zA-Z0-9-!()._`~@#$%^&*+=[\]{}|<>,;: ]+$/
if (!characterRegex.test(trimmed)) {
return i18n ? i18n('passwordCharacterError') : ERRORS.CHARACTER;
}