diff --git a/frontend/src/ts/commandline/commandline-metadata.ts b/frontend/src/ts/commandline/commandline-metadata.ts index a60cfa997..df0978c61 100644 --- a/frontend/src/ts/commandline/commandline-metadata.ts +++ b/frontend/src/ts/commandline/commandline-metadata.ts @@ -582,9 +582,6 @@ export const commandlineConfigMetadata: CommandlineConfigMetadataObject = { fontSize: { input: { inputValueConvert: Number, - validation: { - isValid: async (number: number) => number < 100, - }, }, }, fontFamily: { diff --git a/frontend/src/ts/elements/input-validation.ts b/frontend/src/ts/elements/input-validation.ts index 665f98051..02ae9cfb8 100644 --- a/frontend/src/ts/elements/input-validation.ts +++ b/frontend/src/ts/elements/input-validation.ts @@ -42,7 +42,7 @@ export function debounceIfNeeded any>( delay: number, callback: T ): T | debounce { - if (delay === undefined || delay <= 0) { + if (delay <= 0) { return callback; } return debounce(delay, callback); @@ -64,7 +64,7 @@ export function createInputEventHandler( let callIsValid = validation.isValid !== undefined ? debounceIfNeeded( - validation.debounceDelay ?? 100, + validation.debounceDelay ?? 250, async ( originalInput: HTMLInputElement, currentValue: string, diff --git a/frontend/src/ts/pages/login.ts b/frontend/src/ts/pages/login.ts index d073824d1..8aaede81e 100644 --- a/frontend/src/ts/pages/login.ts +++ b/frontend/src/ts/pages/login.ts @@ -105,7 +105,7 @@ validateWithIndicator(emailInputEl, { } return true; }, - debounceDelay: 10, + debounceDelay: 0, callback: (result) => { if (result.status === "success") { //re-validate the verify email @@ -123,7 +123,7 @@ validateWithIndicator(emailVerifyInputEl, { ? true : "verify email not matching email"; }, - debounceDelay: 10, + debounceDelay: 0, callback: (result) => { registerForm.email = result.status === "success" ? emailInputEl.value : undefined; @@ -148,7 +148,7 @@ validateWithIndicator(passwordInputEl, { } return true; }, - debounceDelay: 10, + debounceDelay: 0, callback: (result) => { if (result.status === "success") { //re-validate the verify password @@ -166,7 +166,7 @@ validateWithIndicator(passwordVerifyInputEl, { ? true : "verify password not matching password"; }, - debounceDelay: 10, + debounceDelay: 0, callback: (result) => { registerForm.password = result.status === "success" ? passwordInputEl.value : undefined;