InvisibleChat: improve encryption validator (#1646)

This commit is contained in:
Sammy 2023-08-16 00:57:56 +02:00 committed by GitHub
parent ca439e9e9a
commit 55b755b2df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,7 +35,7 @@ function EncModal(props: ModalProps) {
const [password, setPassword] = React.useState("password");
const [noCover, setNoCover] = React.useState(false);
const isValid = secret && (noCover || (cover && /\w \w/.test(cover)));
const isValid = secret && (noCover || (cover && cover.trim().split(" ").length > 1));
return (
<ModalRoot {...props}>