This is a demo of how the Validation Context can be used to validate a form with multiple steps. Start typing in
the form or press Save to trigger validation.
Total errors: ${this.totalErrorCount}
Tab 1
${when(this.tab1ErrorCount, () => html` ${this.tab1ErrorCount} `)}
Tab 2
${when(this.tab2ErrorCount, () => html` ${this.tab2ErrorCount} `)}
${when(this.tab == '1', () => html` ${this.#renderTab1()} `)}
${when(this.tab == '2', () => html` ${this.#renderTab2()} `)}
Save
Check valid
Validation Context Messages
${JSON.stringify(this.messages ?? [], null, 3)}
`;
}
#renderTab1() {
return html`