InvisibleChat: improve encryption validator (#1646)
This commit is contained in:
parent
ca439e9e9a
commit
55b755b2df
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ function EncModal(props: ModalProps) {
|
||||||
const [password, setPassword] = React.useState("password");
|
const [password, setPassword] = React.useState("password");
|
||||||
const [noCover, setNoCover] = React.useState(false);
|
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 (
|
return (
|
||||||
<ModalRoot {...props}>
|
<ModalRoot {...props}>
|
||||||
|
|
Loading…
Reference in a new issue