method
NumberListField.ReplaceValidators
Replace the list’s save validators.
Example
field.NumberList("availableSizes").ReplaceValidators()Arguments
| Argument | Type | Description |
|---|---|---|
values | []Validator[[]float64] | The replacement callbacks; omit all arguments to remove custom save validators. |
Returns
The updated NumberListField; the original field is unchanged.
NumberListFieldHow it works
Built-in item/count limits and live validators remain in place. Each callback receives the whole []float64 list.
Full signature
func (f NumberListField) ReplaceValidators(
values ...Validator[[]float64],
) NumberListFieldRelated types
NumberListFieldA configurable list of numbers.
ValidatorValidator checks a field before saving, after built-in checks and write hooks. Return issues for values the author needs to fix, or an error if the check could not run. An issue belongs to this field unless its Target names a child.