`,
})
export class App {
private readonly form = inject(EpdfForm);
protected readonly check = signal(null);
/** importValues() writes the values as one change. It runs no field's own rule. */
protected async importOrder() {
await this.form.importValues(ORDER);
this.check.set(null);
}
/** Check every value against its field's own rules, and go to the first problem. */
protected async checkValues() {
const result = await this.form.validateValues();
this.check.set(result);
const first = result.missing[0] ?? result.invalid[0]?.field;
if (first) this.form.focus(first.ref);
}
}