function

TextList

Add a field containing an ordered list of text values.

Example

go
field.TextList("sellingPoints").MinRows(1).MaxRows(8).MaxLength(120)

Arguments

ArgumentTypeDescription
namestringThe stored field name.

Returns

A TextListField definition. Call its methods to set item limits, list length, defaults, or callbacks.

TextListField

How it works

Order and duplicates are preserved. Strings are not trimmed. MinLength and MaxLength apply to each string, counting Unicode code points.

Required requires at least one item. MinRows and MaxRows count items; they do not limit each item’s value. An explicit empty list remains an empty array.

Validators and hooks receive the complete []string value. Use Array for items with child fields, or MultiSelect for choices from a predefined set.

Full signature

Related types

Related guides