SoulNETLib.Blazor 0.4.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package SoulNETLib.Blazor --version 0.4.5
                    
NuGet\Install-Package SoulNETLib.Blazor -Version 0.4.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SoulNETLib.Blazor" Version="0.4.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SoulNETLib.Blazor" Version="0.4.5" />
                    
Directory.Packages.props
<PackageReference Include="SoulNETLib.Blazor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SoulNETLib.Blazor --version 0.4.5
                    
#r "nuget: SoulNETLib.Blazor, 0.4.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SoulNETLib.Blazor@0.4.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SoulNETLib.Blazor&version=0.4.5
                    
Install as a Cake Addin
#tool nuget:?package=SoulNETLib.Blazor&version=0.4.5
                    
Install as a Cake Tool

SoulNETLib.Blazor

Common Blazor utilities for form validation, field identifier resolution, and CSS framework integration. Designed as a shared foundation for Blazor applications using SoulNETLib.

Installation

dotnet add package SoulNETLib.Blazor

Utilities

FieldIdentifierHelper

Static utility for resolving dotted property paths to Blazor FieldIdentifier instances. Supports simple properties, nested objects, indexed collections, and case-insensitive matching. Framework-agnostic — works with any CSS framework.

// "Ingredients[0].Amount" → FieldIdentifier pointing to the Amount property
// on the first item in the Ingredients collection
var fieldId = FieldIdentifierHelper.ToFieldIdentifier(editContext, "Ingredients[0].Amount");

Bootstrap Integration

BootstrapFieldCssClassProvider

Maps Blazor validation state to Bootstrap CSS classes (is-valid / is-invalid). Unmodified fields show no styling; modified fields show green or red borders.

var editContext = new EditContext(model);
editContext.SetFieldCssClassProvider(new BootstrapFieldCssClassProvider());

Note: BootstrapValidation sets this automatically — you only need to set it manually when not using the validation component.

BootstrapValidation

A Blazor validator component that pushes server-side validation errors into the EditContext, styled for Bootstrap forms.

Razor usage:

<EditForm Model="@model" OnValidSubmit="HandleSubmit">
    <DataAnnotationsValidator />
    <BootstrapValidation @ref="serverValidation" />

    <InputText @bind-Value="model.Name" class="form-control" />
    <ValidationMessage For="() => model.Name" />

    <button type="submit" class="btn btn-primary">Save</button>
</EditForm>

Pushing server errors (Blazor WASM with HTTP API):

private BootstrapValidation? serverValidation;

private async Task HandleSubmit()
{
    var response = await Http.PostAsJsonAsync("api/items", model);

    if (!response.IsSuccessStatusCode)
    {
        // Parse your error response into Dictionary<string, IReadOnlyList<string>>
        var errors = await ParseErrors(response);
        serverValidation?.DisplayErrors(errors);
    }
}

Pushing server errors (Server-side Blazor with direct handler injection):

private BootstrapValidation? serverValidation;

private async Task HandleSubmit()
{
    var result = await handler.Handle(command, cancellationToken);

    if (result is IValidationResult validation)
    {
        var errors = validation.Errors
            .GroupBy(e => e.Field ?? string.Empty)
            .ToDictionary(
                g => g.Key,
                g => (IReadOnlyList<string>)g.Select(e => e.Message).ToList());

        serverValidation?.DisplayErrors(errors);
    }
}
Package Purpose
SoulNETLib.Clean.Domain Result pattern, Error type, repository abstractions
SoulNETLib.Clean.Application CQRS interfaces, pipeline behaviors, validation
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.6 212 5/23/2026
0.4.5 111 5/18/2026
0.4.4 115 5/17/2026