LykosAI/StabilityMatrix · warning · DataValidationException
Name is required
Error message
Name is required
What it means
The 'Create Extension Pack' dialog's Name field validator throws DataValidationException('Name is required') when the entered pack name is null or whitespace. It guarantees every extension pack gets a non-empty identifier before creation.
Solutions
- Type a non-empty name for the extension pack before confirming.
- If scripting, ensure the name argument passed to the dialog is trimmed and non-empty.
Example fix
// before
if (string.IsNullOrWhiteSpace(text)) throw new DataValidationException("Name is required");
// after
var name = text?.Trim();
if (string.IsNullOrEmpty(name)) throw new DataValidationException("Name is required"); Defensive patterns
Strategy: validation
Validate before calling
var name = promptText?.Trim(); if (string.IsNullOrEmpty(name)) return; // do not submit
Type guard
bool HasName(string? s) => !string.IsNullOrWhiteSpace(s);
Try / catch
try { await ShowCreatePackDialog(); }
catch (DataValidationException ex) { SetFieldError(ex.Message); } Prevention
- Type the pack name before clicking OK; check the field is non-empty.
- Keep the OK button disabled while the name field is blank.
- Trim input to distinguish whitespace-only entries from real names.
When it happens
Trigger: Confirming the Pack Name text-entry dialog with an empty or whitespace-only Name field.
Common situations: User clicks OK immediately after the dialog opens without typing a name; clipboard paste of whitespace.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12).
Data as JSON: /api/errors/1f05009ee0e02bca.
Report an issue: GitHub.
Appendix: source
Thrown at StabilityMatrix.Avalonia/ViewModels/PackageManager/PackageExtensionBrowserViewModel.cs:841
foreach (var item in SelectedInstalledItems.ToImmutableArray())
item.IsSelected = false;
foreach (var item in SelectedExtensionPackExtensions.ToImmutableArray())
item.IsSelected = false;
}
private (BetterContentDialog dialog, TextBoxField nameField) GetNameEntryDialog()
{
var textFields = new TextBoxField[]
{
new()
{
Label = "Name",
Validator = text =>
{
if (string.IsNullOrWhiteSpace(text))
throw new DataValidationException("Name is required");
if (ExtensionPacks.Any(pack => pack.Name == text))
throw new DataValidationException("Pack already exists");
},
},
};
return (DialogHelper.CreateTextEntryDialog("Pack Name", "", textFields), textFields[0]);
}
private async Task<bool> BeforeInstallCheck()
{
if (
!settingsManager.Settings.SeenTeachingTips.Contains(
Core.Models.Settings.TeachingTip.PackageExtensionsInstallNotice
)
)
{View on GitHub (pinned to af93d6ef57)