@astro-utils/forms
Version:
Server component for Astro (call server functions from client side with validation and state management)
7 lines (6 loc) • 507 B
TypeScript
import type { AstroGlobal } from 'astro';
import { BindForm } from './form-utils/bind-form.js';
export declare function stringifySelectValue(value: Date | Number | string): string;
export declare function validateSelect(astro: AstroGlobal, bind: BindForm<any>, bindId: string): Promise<string[]>;
export declare function validateSelectOption(bind: BindForm<any>, name: string, stringifyValue: string): void;
export declare function getSelectValueFromBind(bind: BindForm<any>, astro: AstroGlobal): string[];