MCPcopy
hub / github.com/pocketbase/pocketbase / PrepareValue

Method PrepareValue

core/field.go:106–106  ·  view source on GitHub ↗

PrepareValue returns a properly formatted field value based on the provided raw one. This method is also called on record construction to initialize its default field value.

(record *Record, raw any)

Source from the content-addressed store, hash-verified

104 //
105 // This method is also called on record construction to initialize its default field value.
106 PrepareValue(record *Record, raw any) (any, error)
107
108 // ValidateSettings validates the current field value associated with the provided record.
109 ValidateValue(ctx context.Context, app App, record *Record) error

Callers 6

NewRecordFunction · 0.65
SetIfFieldExistsMethod · 0.65

Calls

no outgoing calls

Tested by 3