NetcodeHub.Packages.Components.Validations
1.0.1
dotnet add package NetcodeHub.Packages.Components.Validations --version 1.0.1
NuGet\Install-Package NetcodeHub.Packages.Components.Validations -Version 1.0.1
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.Validations" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NetcodeHub.Packages.Components.Validations --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NetcodeHub.Packages.Components.Validations, 1.0.1"
#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.Validations as a Cake Addin #addin nuget:?package=NetcodeHub.Packages.Components.Validations&version=1.0.1 // Install NetcodeHub.Packages.Components.Validations as a Cake Tool #tool nuget:?package=NetcodeHub.Packages.Components.Validations&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Install the package
NetcodeHub.Packages.Components.Validations
Include the namespace in your project or import.razor file**
@using NetcodeHub.Packages.Components.Validations.OnInput
User Normal components
<EditForm Model="customer" OnValidSubmit="Save">
<DataAnnotationsValidator />
<label class="form-label">ID</label>
<Number class="form-control mb-2" @bind-Value="customer.Id" />
<ValidationMessage For="()=>customer.Id" />
<label class="form-label">Name</label>
<Text class="form-control mb-2" Type="text" @bind-Value="customer.Name" />
<ValidationMessage For="()=>customer.Name" />
<label class="form-label">Email</label>
<Text Type="email" class="form-control mb-2" @bind-Value="customer.Email" />
<ValidationMessage For="()=>customer.Email" />
<label class="form-label">Password</label>
<Text Type="password" class="form-control mb-2" @bind-Value="customer.Password" />
<ValidationMessage For="()=>customer.Password" />
<label class="form-label">Address</label>
<TextArea class="form-control mb-2" @bind-Value="customer.Address" />
<ValidationMessage For="()=>customer.Address" />
<button class="btn btn-primary" type="submit">Save</button>
</EditForm>
Using Floating components
<EditForm Model="customer" OnValidSubmit="Save">
<DataAnnotationsValidator />
<FloatingNumber class="form-control mb-2" @bind-Value="customer.Id" Label="ID" Placeholder="eg. 123" />
<ValidationMessage For="()=>customer.Id" />
<FloatingText class="form-control mb-2" Type="text" @bind-Value="customer.Name" Label="Fullname" Placeholder="John Doe" />
<ValidationMessage For="()=>customer.Name" />
<FloatingText class="form-control mb-2" Type="email" @bind-Value="customer.Email" Label="Email Address"
Placeholder="JohnDoe@example.com" />
<ValidationMessage For="()=>customer.Email" />
<FloatingText class="form-control mb-2" Type="password" @bind-Value="customer.Password" Label="User Password" />
<ValidationMessage For="()=>customer.Password" />
<FloatingTextArea class="form-control mb-2" @bind-Value="customer.Address" Label="Message" Placeholder="Hello..." />
<ValidationMessage For="()=>customer.Address" />
<button class="btn btn-primary" type="submit">Save</button>
<ValidationSummary/>
</EditForm>
Customer customer = new();
void Save()
{
}
public class Customer
{
[Required, Range(5, 100)]
public int Id { get; set; }
[Required, MinLength(5), MaxLength(10)]
public string? Name { get; set; }
[Required, MinLength(5), MaxLength(15), EmailAddress]
public string? Email { get; set; }
[Required, MinLength(5), MaxLength(20)]
public string? Address { get; set; }
[Required, MinLength(5), MaxLength(10)]
public string? Password { get; set; }
}
Product | Versions 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.
-
net8.0
- Microsoft.AspNetCore.Components.Web (>= 8.0.0)
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.1 | 2,301 | 3/4/2024 |
This version includes (Types) which can be any of the following: email, text, password, number etc..