Class: BrainSettingsValidationResult
The result of validating the brain settings and prompt
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new BrainSettingsValidationResult()
Defined in
Properties
errors
• errors: string
[]
The list of errors
Defined in
Accessors
success
• get
success(): boolean
Whether the validation was successful or not
Returns
boolean
Defined in
Methods
addError
▸ addError(error
): BrainSettingsValidationResult
Add an error
Parameters
Name | Type | Description |
---|---|---|
error | string | The error message |
Returns
Itself
Defined in
addFieldError
▸ addFieldError(fieldName
, error
): BrainSettingsValidationResult
Add a field error
Parameters
Name | Type | Description |
---|---|---|
fieldName | string | Name of the field or setting that is invalid |
error | string | The error message |
Returns
Itself
Defined in
getMessage
▸ getMessage(): string
Get all the error messages concatenated
Returns
string
The error message
Defined in
createError
▸ Static
createError(error
): BrainSettingsValidationResult
Create a new validation result with an error
Parameters
Name | Type | Description |
---|---|---|
error | string | The error message |
Returns
The validation result