Password limit (#1191)

* changes

* changes

* changes

* changes

* changes

* changez
This commit is contained in:
Apoorv Taneja 2019-10-17 22:23:11 +05:30 committed by Cassie Tarakajian
parent dd2094f7a3
commit 5fa806d33e

View file

@ -44,7 +44,9 @@ export function validateSettings(formProps) {
if (formProps.currentPassword && !formProps.newPassword) {
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;
}
@ -67,10 +69,8 @@ export function validateSignup(formProps) {
if (!formProps.password) {
errors.password = 'Please enter a password';
}
if (formProps.password) {
if (formProps.password.length < 6) {
errors.password = 'Password must be at least 6 characters';
}
if (formProps.password && formProps.password.length < 6) {
errors.password = 'Password must be at least 6 characters';
}
if (!formProps.confirmPassword) {
errors.confirmPassword = 'Please enter a password confirmation';