fix: password length > 6

This commit is contained in:
Tristan Yang
2022-12-02 21:18:53 +08:00
parent 0210df6a96
commit 33d2b5dd54
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -55,6 +55,10 @@ export default function Reg() {
const handleReg = async (evt: FormEvent<HTMLFormElement>) => {
evt.preventDefault();
const { email, password, confirmPassword } = input;
if (password.length < 6) {
toast.error("Password greater than 6!");
return;
}
if (password !== confirmPassword) {
toast.error("Not Same Password!");
return;