/** * Validates a value against a set of configurable validation rules including required, email, phone, regex, integer, min/max constraints, and equality checks. * * @ai-category Validation, Form * @ai-related FORM_ITEM_DEFAULT_VALUE * * @param value - The value to validate; can be a string, boolean, or array of strings. * @param options - Optional validation options specifying which rules to apply (required, email, min, max, phone, equals, regex, integer). * @returns An object with `hasError` (boolean) and optionally `message` (string) describing the validation failure. * * @example * ```typescript * import { validateValue } from "@ikas/bp-storefront"; * const result = validateValue("user@example.com", { required: true, email: true }); * if (result.hasError) { * console.log(result.message); * } * ``` */ export declare function validateValue(value: string | boolean | string[], options?: IkasValidateValueOptions): { hasError: boolean; message: string; } | { hasError: boolean; message?: undefined; }; type IkasValidateValueOptions = { required?: boolean; email?: boolean; min?: number; max?: number; phone?: boolean; equals?: string; regex?: string; integer?: boolean; }; /** * Default initial state for a form item, with an empty value, no error, and no message. * * @ai-category Validation, Form * @ai-related validateValue * * @example * ```typescript * import { FORM_ITEM_DEFAULT_VALUE } from "@ikas/bp-storefront"; * const field = { ...FORM_ITEM_DEFAULT_VALUE, label: "Email" }; * ``` */ export declare const FORM_ITEM_DEFAULT_VALUE: { value: string; hasError: boolean; message: undefined; }; export {};