mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 05:09:43 +02:00
fix: Add missing validation for password
This commit is contained in:
parent
c92612169b
commit
be2642c9ce
1 changed files with 2 additions and 3 deletions
|
@ -8,7 +8,7 @@ import { withPopup } from '../../lib/popup';
|
||||||
import { Input, Popup } from '../../lib/custom-ui';
|
import { Input, Popup } from '../../lib/custom-ui';
|
||||||
|
|
||||||
import { useForm } from '../../hooks';
|
import { useForm } from '../../hooks';
|
||||||
import { isUsername } from '../../utils/validator';
|
import { isPassword, isUsername } from '../../utils/validator';
|
||||||
|
|
||||||
import styles from './UserAddPopup.module.scss';
|
import styles from './UserAddPopup.module.scss';
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ const UserAddStep = React.memo(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cleanData.password) {
|
if (!cleanData.password || !isPassword(cleanData.password)) {
|
||||||
passwordField.current.focus();
|
passwordField.current.focus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,6 @@ const UserAddStep = React.memo(
|
||||||
name="password"
|
name="password"
|
||||||
value={data.password}
|
value={data.password}
|
||||||
readOnly={isSubmitting}
|
readOnly={isSubmitting}
|
||||||
className={styles.field}
|
|
||||||
onChange={handleFieldChange}
|
onChange={handleFieldChange}
|
||||||
/>
|
/>
|
||||||
<div className={styles.note}>
|
<div className={styles.note}>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue