import type { InputTextValidationRule } from "../../types/components/input-text"; /** * Maps a native `ValidityState` to the first failing validation rule, so the * per-rule error copy can be picked. Order matters: an empty required field is * reported as `required` even if other constraints would also fail. * * `typeMismatch` lands in `format` even without `validation.format`, since a * `keyboard_type: "email"` input is `type="email"` and fails the same way. * `stepMismatch` (a non-integer on the `numeric` keyboard) falls back to * `format` as well. * * `customError` is only ever set by the component itself, for the constraints * it checks instead of the browser (`maxLength`, and a `pattern` the browser * cannot compile); `customRule` says which one failed. */ export declare function failingRuleFromValidity(validity: ValidityState, customRule?: InputTextValidationRule | null): InputTextValidationRule | null;