static/jsvm/interfaces/core.TextField.html
TextField defines "text" type field for storing any string value.
The respective zero record field value is empty string.
The following additional setter keys are available:
record.Set("slug:autogenerate", "") // [random value] record.Set("slug:autogenerate", "abc-") // abc-[random value]Copy
columnTypefindSettergetHiddengetIdgetNamegetSysteminterceptprepareValuesetHiddensetIdsetNamesetSystemtypevalidatePlainValuevalidateSettingsvalidateValue
autogeneratePatternhiddenidmaxminnamepatternpresentableprimaryKeyrequiredsystem
ColumnType implements [Field.ColumnType] interface method.
FindSetter implements the [SetterFinder] interface.
GetHidden implements [Field.GetHidden] interface method.
GetId implements [Field.GetId] interface method.
GetName implements [Field.GetName] interface method.
GetSystem implements [Field.GetSystem] interface method.
Intercept implements the [RecordInterceptor] interface.
-
- (): void
-
PrepareValue implements [Field.PrepareValue] interface method.
SetHidden implements [Field.SetHidden] interface method.
SetId implements [Field.SetId] interface method.
SetName implements [Field.SetName] interface method.
SetSystem implements [Field.SetSystem] interface method.
Type implements [Field.Type] interface method.
ValidatePlainValue validates the provided string against the field options.
ValidateSettings implements [Field.ValidateSettings] interface method.
ValidateValue implements [Field.ValidateValue] interface method.
autogeneratePattern: string
AutogeneratePattern specifies an optional regex pattern that could be used to generate random string from it and set it automatically on record create if no explicit value is set or when the :autogenerate modifier is used.
Note: the generated value still needs to satisfy min, max, pattern (if set)
hidden: boolean
Hidden hides the field from the API response.
id: string
Id is the unique stable field identifier.
It is automatically generated from the name when adding to a collection FieldsList.
max: number
Max specifies the maximum allowed string characters.
If zero, a default limit of 5000 is applied.
min: number
Min specifies the minimum required string characters.
if zero value, no min limit is applied.
name: string
Name (required) is the unique name of the field.
pattern: string
Pattern specifies an optional regex pattern to match against the field value.
Leave it empty to skip the pattern check.
presentable: boolean
Presentable hints the Dashboard UI to use the underlying field record value in the relation preview label.
primaryKey: boolean
PrimaryKey will mark the field as primary key.
A single collection can have only 1 field marked as primary key.
required: boolean
Required will require the field value to be non-empty string.
system: boolean
System prevents the renaming and removal of the field.
OSLightDark
Generated using TypeDoc