Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
password: (state, parentState) => {
if (!parentState.value.createAccount) {
return disable(state);
}
state = enable(state);
state = validate(state, validatePasswordsMatch);
return updateGroup(state, {
password: validate(required, minLength(8)),
});
},
agreeToTermsOfUse: validate(requiredTrue),
password: (state, parentState) => {
if (!parentState.value.createAccount) {
return disable(state);
}
state = enable(state);
return updateGroup(state, {
password: validate(required, minLength(8)),
confirmPassword: validate(equalTo(state.value.password)),
});
},
agreeToTermsOfUse: validate(requiredTrue),