Text List
Interface
export type ITextListTypeValue = string[];
export interface ITextListField extends CommonField {
type: 'text-list';
options?: {
placeholder?: string;
};
private?: () => Promise<ITextListTypeValue>;
render?: (v: ITextListTypeValue) => JSX.Element;
validation?: Validation<ITextListTypeValue>;
}Example
{
type: 'text-list',
name: 'YOUR_PATH',
options: {
placeholder: 'Add items to the list'
},
validation: z
.array(z.string().min(1, { message: 'Item cannot be empty' }))
.min(1, { message: 'At least one item is required' })
}