diff --git a/frontend/src/ts/elements/input-validation.ts b/frontend/src/ts/elements/input-validation.ts index 73a595679..c07c61760 100644 --- a/frontend/src/ts/elements/input-validation.ts +++ b/frontend/src/ts/elements/input-validation.ts @@ -146,6 +146,7 @@ export type ValidationOptions = (T extends string export type ValidatedHtmlInputElement = HTMLInputElement & { isValid: () => boolean | undefined; setValue: (val: string | null) => void; + triggerValidation: () => void; }; /** * adds an 'InputIndicator` to the given `inputElement` and updates its status depending on the given validation @@ -207,6 +208,9 @@ export function validateWithIndicator( inputElement.dispatchEvent(new Event("input")); } }; + result.triggerValidation = () => { + inputElement.dispatchEvent(new Event("input")); + }; return result; }