NetcodeHub.Packages.Components.OnPageLoadValidation 1.0.0

dotnet add package NetcodeHub.Packages.Components.OnPageLoadValidation --version 1.0.0
NuGet\Install-Package NetcodeHub.Packages.Components.OnPageLoadValidation -Version 1.0.0
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="NetcodeHub.Packages.Components.OnPageLoadValidation" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NetcodeHub.Packages.Components.OnPageLoadValidation --version 1.0.0
#r "nuget: NetcodeHub.Packages.Components.OnPageLoadValidation, 1.0.0"
#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.
// Install NetcodeHub.Packages.Components.OnPageLoadValidation as a Cake Addin
#addin nuget:?package=NetcodeHub.Packages.Components.OnPageLoadValidation&version=1.0.0

// Install NetcodeHub.Packages.Components.OnPageLoadValidation as a Cake Tool
#tool nuget:?package=NetcodeHub.Packages.Components.OnPageLoadValidation&version=1.0.0

How to Use The Package

Install the package

NetcodeHub.Packages.Components.OnPageLoadValidation

Start Using in Editform to Enforce its Validation on Page Startup

<h1>Default Blazor Components</h1>
<EditForm Model="ProductModel" OnValidSubmit="SaveProduct">
    <DataAnnotationsValidator />
    <ValidationSummary/>
    <NetcodeHub.Packages.Components.OnPageLoadValidation.NetcodeHubEditFormValidatorOnPageLoad />
    <div class="mt-3">
        <label class="form-label">Name</label>
        <InputText @bind-Value="ProductModel.Name" class="form-control" />
        <ValidationMessage For="() => ProductModel.Name" />
    </div>
    <div class="mt-3">
        <label class="form-label">Quantity</label>
        <InputNumber @bind-Value="ProductModel.Quantity" class="form-control" />
        <ValidationMessage For="() => ProductModel.Quantity" />
    </div>
    <div class="mt-3">
        <label class="form-label">Description</label>
        <InputTextArea @bind-Value="ProductModel.Description" class="form-control" />
        <ValidationMessage For="() => ProductModel.Description" />
    </div>

    <button type="submit" class="btn btn-primary mt-3 mb-5">Save</button>
</EditForm>

@code {
    Product ProductModel = new();

    void SaveProduct()
    {

    }

    public class Product
    {
        public int Id { get; set; }
        [Required, MinLength(5), MaxLength(10)]
        public string? Name { get; set; }
        [Required, Range(1, 10)]
        public int Quantity { get; set; }
        [Required, MinLength(5), MaxLength(10)]
        public string? Description { get; set; }
    }
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.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
1.0.0 71 6/23/2024

I am excited to announce the release of NetcodeHubEditFormValidatorOnPageLoad, a Blazor component designed to improve your form handling experience.

Features
Automatic Validation: Automatically validates the EditForm when the page loads, ensuring immediate feedback on any validation errors.
Seamless Integration: Easily integrates with existing EditForm components in your Blazor application.
Simplified Code: Minimal code required for setup, making it easy to implement and maintain.
Start using NetcodeHubEditFormValidatorOnPageLoad to enhance the reliability and user experience of your Blazor forms.