All Projects → Blazored → Fluentvalidation

Blazored / Fluentvalidation

Licence: mit
A library for using FluentValidation with Blazor

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Fluentvalidation

Toast
A JavaScript free toast library for Blazor and Razor Component applications
Stars: ✭ 296 (+60.87%)
Mutual labels:  hacktoberfest, nuget
Modal
A powerful and customizable modal implementation for Blazor applications.
Stars: ✭ 406 (+120.65%)
Mutual labels:  hacktoberfest, nuget
Mond
A scripting language for .NET Core
Stars: ✭ 237 (+28.8%)
Mutual labels:  hacktoberfest, nuget
Typeahead
Typeahead control for Blazor applications
Stars: ✭ 226 (+22.83%)
Mutual labels:  hacktoberfest, nuget
Menu
A JavaScript free menu library for Blazor and Razor Components applications.
Stars: ✭ 118 (-35.87%)
Mutual labels:  hacktoberfest, nuget
Strongbox
Strongbox is an artifact repository manager.
Stars: ✭ 412 (+123.91%)
Mutual labels:  hacktoberfest, nuget
32feet
Personal Area Networking for .NET
Stars: ✭ 395 (+114.67%)
Mutual labels:  hacktoberfest, nuget
Sessionstorage
A library to provide access to session storage in Blazor applications
Stars: ✭ 132 (-28.26%)
Mutual labels:  hacktoberfest, nuget
Quartznet
Quartz Enterprise Scheduler .NET
Stars: ✭ 4,825 (+2522.28%)
Mutual labels:  hacktoberfest, nuget
Localstorage
A library to provide access to local storage in Blazor applications
Stars: ✭ 425 (+130.98%)
Mutual labels:  hacktoberfest, nuget
Colore
A powerful C# library for Razer Chroma's SDK
Stars: ✭ 121 (-34.24%)
Mutual labels:  hacktoberfest, nuget
Msbuild.sdk.sqlproj
An MSBuild SDK that provides similar functionality to SQL Server Data Tools (.sqlproj) projects
Stars: ✭ 142 (-22.83%)
Mutual labels:  hacktoberfest, nuget
Docker
🐳
Stars: ✭ 183 (-0.54%)
Mutual labels:  hacktoberfest
Training Material
A collection of Galaxy-related training material
Stars: ✭ 184 (+0%)
Mutual labels:  hacktoberfest
Px4 Sitl gazebo
Set of plugins, models and worlds to use with OSRF Gazebo Simulator in SITL and HITL.
Stars: ✭ 182 (-1.09%)
Mutual labels:  hacktoberfest
Terraform Provider Sentry
Terraform provider for Sentry
Stars: ✭ 183 (-0.54%)
Mutual labels:  hacktoberfest
View component reflex
Stars: ✭ 185 (+0.54%)
Mutual labels:  hacktoberfest
Linebot
🤖 SDK for the LINE Messaging API for Node.js
Stars: ✭ 184 (+0%)
Mutual labels:  hacktoberfest
Discord Bot Dashboard
📊 A tool for Discord.js Bot Developers to get detailed analytics of their bots and to manage them.
Stars: ✭ 182 (-1.09%)
Mutual labels:  hacktoberfest
Comunica
📬 A knowledge graph querying framework for JavaScript
Stars: ✭ 183 (-0.54%)
Mutual labels:  hacktoberfest

FluentValidation

A library for using FluentValidation with Blazor

Build & Test Main

Nuget

Installing

You can install from Nuget using the following command:

Install-Package Blazored.FluentValidation

Or via the Visual Studio package manger.

Basic Usage

Start by add the following using statement to your root _Imports.razor.

@using Blazored.FluentValidation

You can then use it as follows within a EditForm component.

<EditForm Model="@Person" OnValidSubmit="@SubmitValidForm">
    <FluentValidationValidator />
    <ValidationSummary />

    <p>
        <label>Name: </label>
        <InputText @bind-Value="@Person.Name" />
    </p>

    <p>
        <label>Age: </label>
        <InputNumber @bind-Value="@Person.Age" />
    </p>

    <p>
        <label>Email Address: </label>
        <InputText @bind-Value="@Person.EmailAddress" />
    </p>

    <button type="submit">Save</button>

</EditForm>

@code {
    Person Person { get; set; } = new Person();

    void SubmitValidForm()
    {
        Console.WriteLine("Form Submitted Successfully!");
    }
}

Finding Validators

By default, the component will check for validators registered with DI first. If it can't find, any it will then try scanning the applications assemblies to find validators using reflection.

You can control this behaviour using the DisableAssemblyScanning parameter. If you only wish the component to get validators from DI, set the value to true and assembly scanning will be skipped.

<FluentValidationValidator DisableAssemblyScanning="@true" />

You can find examples of different configurations in the sample projects. The Blazor Server project is configured to load validators from DI only. The Blazor WebAssembly project is setup to load validators using reflection.

Note: When scanning assemblies the component will swallow any exceptions thrown by that process. This is to stop exceptions thrown by scanning third party dependencies crashing your app.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].