Files
NapCatQQ/.pnpm-store/v3/files/ae/346c415af241a52da35d35eef5466a3985a4f03ab3b000287405a90d972a8e2d7797346c5bd94560e38f230d9102242e2c9c5cdb4a17cd51a047ba8b7b895a
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

28 lines
1.4 KiB
Plaintext

import { Validation, ValidationErrors, ValidationResult } from "@react-types/shared";
import { Context } from "react";
export const VALID_VALIDITY_STATE: ValidityState;
export const DEFAULT_VALIDATION_RESULT: ValidationResult;
export const FormValidationContext: Context<ValidationErrors>;
export const privateValidationStateProp: string;
interface FormValidationProps<T> extends Validation<T> {
builtinValidation?: ValidationResult;
name?: string | string[];
value: T | null;
}
export interface FormValidationState {
/** Realtime validation results, updated as the user edits the value. */
realtimeValidation: ValidationResult;
/** Currently displayed validation results, updated when the user commits their changes. */
displayValidation: ValidationResult;
/** Updates the current validation result. Not displayed to the user until `commitValidation` is called. */
updateValidation(result: ValidationResult): void;
/** Resets the displayed validation state to valid when the user resets the form. */
resetValidation(): void;
/** Commits the realtime validation so it is displayed to the user. */
commitValidation(): void;
}
export function useFormValidationState<T>(props: FormValidationProps<T>): FormValidationState;
export function mergeValidation(...results: ValidationResult[]): ValidationResult;
//# sourceMappingURL=types.d.ts.map