UNPKG

@astro-utils/forms

Version:

Server component for Astro (call server functions from client side with validation and state management)

20 lines (19 loc) 750 B
import type AboutFormName from '../about-form-name.js'; import { IHTMLFormPlugin } from './iform-plugin.js'; type SelectObject = { about: AboutFormName; value: string | string[]; options: Set<string>; multiOptions: boolean; required: boolean; }; type SelectValidation = Map<string, SelectObject>; export default class HTMLSelectPlugin extends IHTMLFormPlugin { storage: SelectValidation; static errorOptionNotValid(about: AboutFormName): void; createOneValidation(name: string, keyData: any): void; private createSelectDefault; addNewValue(about: AboutFormName, value: string | string[], multiOptions: boolean, required?: boolean): void; addOption(originalName: string, option: string): void; } export {};