diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_form_with_warn/use_form_with_warn.ts b/x-pack/plugins/security_solution/public/common/hooks/use_form_with_warn/use_form_with_warn.ts index ae24da57bfd45..fd9431ad0b0f8 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_form_with_warn/use_form_with_warn.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/use_form_with_warn/use_form_with_warn.ts @@ -35,6 +35,14 @@ interface UseFormWithWarnReturn; } +/** + * In some cases business logic requires implementing functionality to allow users perform an action + * despite non-critical validation errors a.k.a. warnings. Usually it's also required to inform users + * about warnings they got before proceeding for example via a modal. + * + * Since `FormHook` returned by `useForm` lacks of such functionality. `useFormWithWarn` is here to + * provide warnings functionality. Besides that it it's replaceable with `useForm`. + */ export function useFormWithWarn( formConfig: FormWithWarnConfig ): UseFormWithWarnReturn {