@canard/schema-form
Version:
React-based component library that renders forms based on JSON Schema with plugin system support for validators and UI components
15 lines (14 loc) • 564 B
TypeScript
import { BaseError, type ErrorDetails } from '@winglet/common-utils/error';
/**
* Error class for validation-related errors.
* Used to handle errors that occur during form data validation.
*/
export declare class ValidationError extends BaseError {
constructor(code: string, message: string, details?: ErrorDetails);
}
/**
* Checks if the given error is of ValidationError type.
* @param error - Error object to check
* @returns Whether it is ValidationError type
*/
export declare const isValidationError: (error: unknown) => error is ValidationError;