For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt, and this page is available as Markdown at /zh/api/genui/openui/interfaces/FormValidationContextValue.md.
Lynx
  • 简体中文
  • genui / openui / FormValidationContextValue

    FormValidationContextValue

    Validation state and helpers for OpenUI form fields.

    属性

    clearFieldError()

    clearFieldError: (name: string) => void;

    参数

    范围类型
    namestring

    返回

    void

    定义于

    @lynx-js/genui/openui/src/core/hooks/useFormValidation.ts:30


    errors

    errors: Record<string, undefined | string>;

    定义于

    @lynx-js/genui/openui/src/core/hooks/useFormValidation.ts:20


    getFieldError()

    getFieldError: (name: string) => undefined | string;

    参数

    范围类型
    namestring

    返回

    undefined | string

    定义于

    @lynx-js/genui/openui/src/core/hooks/useFormValidation.ts:21


    registerField()

    registerField: (name: string, rules: ParsedRule[], getValue: () => unknown) => void;

    参数

    范围类型
    namestring
    rulesParsedRule[]
    getValue() => unknown

    返回

    void

    定义于

    @lynx-js/genui/openui/src/core/hooks/useFormValidation.ts:23


    unregisterField()

    unregisterField: (name: string) => void;

    参数

    范围类型
    namestring

    返回

    void

    定义于

    @lynx-js/genui/openui/src/core/hooks/useFormValidation.ts:28


    validateField()

    validateField: (name: string, value: unknown, rules: ParsedRule[]) => boolean;

    参数

    范围类型
    namestring
    valueunknown
    rulesParsedRule[]

    返回

    boolean

    定义于

    @lynx-js/genui/openui/src/core/hooks/useFormValidation.ts:22


    validateForm()

    validateForm: () => boolean;

    返回

    boolean

    定义于

    @lynx-js/genui/openui/src/core/hooks/useFormValidation.ts:29

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。