Password limit (#1191)
* changes * changes * changes * changes * changes * changez
This commit is contained in:
parent
dd2094f7a3
commit
5fa806d33e
1 changed files with 5 additions and 5 deletions
|
@ -44,7 +44,9 @@ export function validateSettings(formProps) {
|
||||||
if (formProps.currentPassword && !formProps.newPassword) {
|
if (formProps.currentPassword && !formProps.newPassword) {
|
||||||
errors.newPassword = 'Please enter a new password or leave the current password empty.';
|
errors.newPassword = 'Please enter a new password or leave the current password empty.';
|
||||||
}
|
}
|
||||||
|
if (formProps.newPassword && formProps.newPassword.length < 6) {
|
||||||
|
errors.newPassword = 'Password must be at least 6 characters';
|
||||||
|
}
|
||||||
return errors;
|
return errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,10 +69,8 @@ export function validateSignup(formProps) {
|
||||||
if (!formProps.password) {
|
if (!formProps.password) {
|
||||||
errors.password = 'Please enter a password';
|
errors.password = 'Please enter a password';
|
||||||
}
|
}
|
||||||
if (formProps.password) {
|
if (formProps.password && formProps.password.length < 6) {
|
||||||
if (formProps.password.length < 6) {
|
errors.password = 'Password must be at least 6 characters';
|
||||||
errors.password = 'Password must be at least 6 characters';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!formProps.confirmPassword) {
|
if (!formProps.confirmPassword) {
|
||||||
errors.confirmPassword = 'Please enter a password confirmation';
|
errors.confirmPassword = 'Please enter a password confirmation';
|
||||||
|
|
Loading…
Reference in a new issue