LaunchBoxContributors
On this page

PluginFormResult14.1

Class in Unbroken.LaunchBox.Plugins.Models.Forms

C#
public sealed class PluginFormResult
Reports whether a plugin form submission or action succeeded and describes any validation errors.

Constructors

PluginFormResult(bool, string, IReadOnlyDictionary<…>)

C#
public PluginFormResult(
    bool succeeded,
    string? errorMessage,
    IReadOnlyDictionary<string, PluginText>? fieldErrors = null
)
Initializes a new instance of the PluginFormResult class.
succeeded
Whether the plugin accepted the submitted values.
errorMessage
An optional literal form-level error on failure.
fieldErrors
Optional localizable errors keyed by form field ID on failure.

PluginFormResult(bool, PluginText, IReadOnlyDictionary<…>)

C#
public PluginFormResult(
    bool succeeded,
    PluginText? errorMessage = null,
    IReadOnlyDictionary<string, PluginText>? fieldErrors = null
)
Initializes a submission result with localizable, formattable errors.
succeeded
Whether the plugin accepted the submitted values.
errorMessage
An optional form-level error, including its fallback format.
fieldErrors
Optional errors keyed by form field ID, each with a fallback format.

Properties

  • ErrorMessageGets the optional localizable, formattable form-level error.
  • FieldErrorsGets localizable, formattable errors keyed by form field ID, ignoring case.
  • SucceededGets whether the plugin accepted the submission or completed the requested action.

ErrorMessage

C#
public PluginText? ErrorMessage { get; }
Gets the optional localizable, formattable form-level error.

FieldErrors

C#
public IReadOnlyDictionary<string, PluginText> FieldErrors { get; }
Gets localizable, formattable errors keyed by form field ID, ignoring case.

Succeeded

C#
public bool Succeeded { get; }
Gets whether the plugin accepted the submission or completed the requested action.