PluginFormResult14.1
Class in Unbroken.LaunchBox.Plugins.Models.Forms
public sealed class PluginFormResult
Reports whether a plugin form submission or action succeeded and describes any validation errors.
Constructors
PluginFormResult(bool, string, IReadOnlyDictionary<…>)Initializes a new instance of the PluginFormResult class.PluginFormResult(bool, PluginText, IReadOnlyDictionary<…>)Initializes a submission result with localizable, formattable errors.
PluginFormResult(bool, string, IReadOnlyDictionary<…>)
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<…>)
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
public PluginText? ErrorMessage { get; }Gets the optional localizable, formattable form-level error.
FieldErrors
public IReadOnlyDictionary<string, PluginText> FieldErrors { get; }Gets localizable, formattable errors keyed by form field ID, ignoring case.
Succeeded
public bool Succeeded { get; }Gets whether the plugin accepted the submission or completed the requested action.