From c5295ce5075ae72a85cd7a9432b30cef39b11e6d Mon Sep 17 00:00:00 2001 From: Erika McVey <50454925+Blackbaud-ErikaMcVey@users.noreply.github.com> Date: Mon, 12 Feb 2024 13:35:07 -0500 Subject: [PATCH 1/2] fix input box harness JSDocs --- .../forms/testing/src/input-box/input-box-harness.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libs/components/forms/testing/src/input-box/input-box-harness.ts b/libs/components/forms/testing/src/input-box/input-box-harness.ts index 9288756e5f..b7a8fe7e30 100644 --- a/libs/components/forms/testing/src/input-box/input-box-harness.ts +++ b/libs/components/forms/testing/src/input-box/input-box-harness.ts @@ -112,35 +112,35 @@ export class SkyInputBoxHarness extends SkyComponentHarness { return (await this.#getFormError()).hasError('minlength'); } - /* + /** * Whether the field is set to an invalid email address. */ public async hasEmailError(): Promise { return (await this.#getFormError()).hasError('email'); } - /* + /** * Whether the field is set to an invalid URL. */ public async hasUrlError(): Promise { return (await this.#getFormError()).hasError('url'); } - /* + /** * Whether the field is set to an invalid date. */ public async hasDateError(): Promise { return (await this.#getFormError()).hasError('date'); } - /* + /** * Whether the field is set to an invalid phone number. */ public async hasPhoneFieldError(): Promise { return (await this.#getFormError()).hasError('phone'); } - /* + /** * Whether the field is set to an invalid time. */ public async hasTimeError(): Promise { @@ -194,7 +194,6 @@ export class SkyInputBoxHarness extends SkyComponentHarness { /** * Indicates whether the input box has stacked styles applied. - * @returns */ public async getStacked(): Promise { const host = await this.host(); From c708bbb487d159fa4e34cad233a98e7b852e4494 Mon Sep 17 00:00:00 2001 From: Erika McVey <50454925+Blackbaud-ErikaMcVey@users.noreply.github.com> Date: Mon, 12 Feb 2024 15:41:45 -0500 Subject: [PATCH 2/2] form error documentation --- .../forms/src/lib/modules/form-error/form-error.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/components/forms/src/lib/modules/form-error/form-error.component.ts b/libs/components/forms/src/lib/modules/form-error/form-error.component.ts index 6773084805..937ee8273d 100644 --- a/libs/components/forms/src/lib/modules/form-error/form-error.component.ts +++ b/libs/components/forms/src/lib/modules/form-error/form-error.component.ts @@ -10,7 +10,10 @@ import { SkyStatusIndicatorModule } from '@skyux/indicators'; import { SKY_FORM_ERRORS_ENABLED } from './form-errors-enabled-token'; /** - * Displays default and custom input error messages for SKY UX form components. + * Displays default and custom form field error messages for form field components. + * Set `labelText` on the form field component to automatically display required, + * maximum length, minimum length, date, email, phone number, time, and URL errors. + * To display custom errors, include sky-form-error elements in the form field component. */ @Component({ selector: 'sky-form-error',