Skip to main content

Class: BrainSettingsValidationResult

The result of validating the brain settings and prompt

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new BrainSettingsValidationResult()

Defined in

models/brainSettings.ts:51

Properties

errors

errors: string[]

The list of errors

Defined in

models/brainSettings.ts:42

Accessors

success

get success(): boolean

Whether the validation was successful or not

Returns

boolean

Defined in

models/brainSettings.ts:47

Methods

addError

addError(error): BrainSettingsValidationResult

Add an error

Parameters

NameTypeDescription
errorstringThe error message

Returns

BrainSettingsValidationResult

Itself

Defined in

models/brainSettings.ts:74


addFieldError

addFieldError(fieldName, error): BrainSettingsValidationResult

Add a field error

Parameters

NameTypeDescription
fieldNamestringName of the field or setting that is invalid
errorstringThe error message

Returns

BrainSettingsValidationResult

Itself

Defined in

models/brainSettings.ts:61


getMessage

getMessage(): string

Get all the error messages concatenated

Returns

string

The error message

Defined in

models/brainSettings.ts:83


createError

Static createError(error): BrainSettingsValidationResult

Create a new validation result with an error

Parameters

NameTypeDescription
errorstringThe error message

Returns

BrainSettingsValidationResult

The validation result

Defined in

models/brainSettings.ts:94