form-functionality-library
Version:
A modular, flexible form functionality library for Webflow forms supporting single-step, multi-step, and branching forms
45 lines • 1.43 kB
TypeScript
/**
* Webflow Native Error Handling - Version 1.9.0
*
* This module provides error handling that works seamlessly with Webflow's native
* required attribute system and styling patterns.
*
* APPROACH:
* - Uses Webflow's native `required` attribute to identify required fields
* - Adds `.active-error` class to `.form_input` for red border styling
* - Adds `.active-error` class to `.form_error-message` for visibility
* - Works with complex structures (email fields with icons, etc.)
* - Removes classes when validation passes
*/
/**
* Initialize the Webflow-native error handling system
*/
export declare function initializeWebflowErrorHandling(): void;
/**
* Show error for a specific field using Webflow's pattern
*/
export declare function showFieldError(fieldName: string, message?: string): void;
/**
* Clear error for a specific field
*/
export declare function clearFieldError(fieldName: string): void;
/**
* Validate all required fields in the current visible step
*/
export declare function validateCurrentStep(): {
isValid: boolean;
errors: string[];
};
/**
* Clear all errors
*/
export declare function clearAllErrors(): void;
/**
* Check if a specific field has an error
*/
export declare function hasFieldError(fieldName: string): boolean;
/**
* Get all fields with errors
*/
export declare function getFieldsWithErrors(): string[];
//# sourceMappingURL=webflowNativeErrors.d.ts.map