mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +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 { useForm } from '../../hooks';
|
||||
import { isUsername } from '../../utils/validator';
|
||||
import { isPassword, isUsername } from '../../utils/validator';
|
||||
|
||||
import styles from './UserAddPopup.module.scss';
|
||||
|
||||
|
@ -69,7 +69,7 @@ const UserAddStep = React.memo(
|
|||
return;
|
||||
}
|
||||
|
||||
if (!cleanData.password) {
|
||||
if (!cleanData.password || !isPassword(cleanData.password)) {
|
||||
passwordField.current.focus();
|
||||
return;
|
||||
}
|
||||
|
@ -149,7 +149,6 @@ const UserAddStep = React.memo(
|
|||
name="password"
|
||||
value={data.password}
|
||||
readOnly={isSubmitting}
|
||||
className={styles.field}
|
||||
onChange={handleFieldChange}
|
||||
/>
|
||||
<div className={styles.note}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue