We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5050493 commit 9e5e483Copy full SHA for 9e5e483
frontend/src/ts/elements/input-validation.ts
@@ -146,6 +146,7 @@ export type ValidationOptions<T> = (T extends string
146
export type ValidatedHtmlInputElement = HTMLInputElement & {
147
isValid: () => boolean | undefined;
148
setValue: (val: string | null) => void;
149
+ triggerValidation: () => void;
150
};
151
/**
152
* adds an 'InputIndicator` to the given `inputElement` and updates its status depending on the given validation
@@ -207,6 +208,9 @@ export function validateWithIndicator<T>(
207
208
inputElement.dispatchEvent(new Event("input"));
209
}
210
211
+ result.triggerValidation = () => {
212
+ inputElement.dispatchEvent(new Event("input"));
213
+ };
214
215
return result;
216
0 commit comments