import type { JSX, ValidComponent } from "@solidjs/web"; import { type FieldRootState } from "../../internals/field-context.js"; import type { BaseUIComponentProps } from "../../internals/types.js"; export interface FieldErrorState extends FieldRootState { } export interface FieldErrorProps extends BaseUIComponentProps<"div", FieldErrorState> { /** Tag/component to render. Defaults to `"div"`. */ as?: ValidComponent; /** * Determines whether to show the error message according to the field's * [ValidityState](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState). * * - `true` forces the error to render regardless of validity (lets external * libraries drive visibility). * - A string picks a specific `ValidityState` key — the error renders only * when that key is `true` in the field's validity snapshot. * - Omitted: render when the field has a `