Padloc Logo Docs & Resources

Interface: FieldDef

item.FieldDef

Field definition containing meta data for a certain field type

Properties

actions

• Optional actions: { icon: string ; label: string ; action: (value: string) => void }[]

Defined in

core/src/item.ts:52


icon

• icon: string

icon used for display

Defined in

core/src/item.ts:45


mask

• mask: boolean

whether the field should be masked when displayed

Defined in

core/src/item.ts:41


matchPattern

• matchPattern: RegExp

regular expression describing pattern of field contents (used for matching)

Defined in

core/src/item.ts:39


multiline

• multiline: boolean

whether the field value can have multiple lines

Defined in

core/src/item.ts:43


name

• name: string

display name

Defined in

core/src/item.ts:47


pattern

• pattern: RegExp

regular expression describing pattern of field contents (used for validation)

Defined in

core/src/item.ts:37


type

• type: FieldType

content type

Defined in

core/src/item.ts:35

Methods

format

▸ Optional format(value, masked): string

display formatting

Parameters

Name Type
value string
masked boolean

Returns

string

Defined in

core/src/item.ts:49


transform

▸ Optional transform(value): Promise<string>

for values that need to be prepared before being copied / filled

Parameters

Name Type
value string

Returns

Promise<string>

Defined in

core/src/item.ts:51