import type { QForm } from 'quasar'; import { nextTick } from 'vue'; export async function validateQForm(formRef: QForm | null | undefined): Promise { await nextTick(); // wait until all inputs are rendered const components = formRef?.getValidationComponents?.(); if (!components) { console.warn('No validation components found in form'); return true; } let allValid = true; for (const comp of components) { const valid = await comp.validate(); if (!valid) allValid = false; } return allValid; }