Throttle validation in response to user input
This avoids the case of the password complexity progress jumping wildly for every character you type.
This commit is contained in:
parent
67d7091dcd
commit
aec14e64fa
2 changed files with 11 additions and 4 deletions
|
@ -37,7 +37,6 @@ import classNames from 'classnames';
|
|||
*/
|
||||
export default function withValidation({ description, rules }) {
|
||||
return async function onValidate({ value, focused, allowEmpty = true }) {
|
||||
// TODO: Re-run only after ~200ms of inactivity
|
||||
if (!value && allowEmpty) {
|
||||
return {
|
||||
valid: null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue