fix: password length > 6
This commit is contained in:
@@ -157,6 +157,9 @@ const AdminAccount: FC<Props> = ({ serverName, nextStep }) => {
|
|||||||
} else if (password === "") {
|
} else if (password === "") {
|
||||||
toast.error("Please enter admin password!");
|
toast.error("Please enter admin password!");
|
||||||
return;
|
return;
|
||||||
|
} else if (password.length < 6) {
|
||||||
|
toast.error("Password length greater than 6!");
|
||||||
|
return;
|
||||||
} else if (password !== confirm) {
|
} else if (password !== confirm) {
|
||||||
toast.error("Two passwords do not match!");
|
toast.error("Two passwords do not match!");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -55,6 +55,10 @@ export default function Reg() {
|
|||||||
const handleReg = async (evt: FormEvent<HTMLFormElement>) => {
|
const handleReg = async (evt: FormEvent<HTMLFormElement>) => {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
const { email, password, confirmPassword } = input;
|
const { email, password, confirmPassword } = input;
|
||||||
|
if (password.length < 6) {
|
||||||
|
toast.error("Password greater than 6!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (password !== confirmPassword) {
|
if (password !== confirmPassword) {
|
||||||
toast.error("Not Same Password!");
|
toast.error("Not Same Password!");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user