All Projects → bsheldrick → validatum

bsheldrick / validatum

Licence: MIT license
An open-source library for building fluent validation functions for .NET.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to validatum

paginator
Offset pagination for Vapor 🗂
Stars: ✭ 67 (+109.38%)
Mutual labels:  fluent
Microsoft.Maui.Graphics.Controls
Experimental Microsoft.Maui.Graphics.Controls - Build drawn controls (Cupertino, Fluent and Material)
Stars: ✭ 549 (+1615.63%)
Mutual labels:  fluent
auth
👤 Authentication and Authorization framework for Fluent.
Stars: ✭ 51 (+59.38%)
Mutual labels:  fluent
fluent-mysql-driver
🖋🐬 Swift ORM (queries, models, relations, etc) built on MySQL.
Stars: ✭ 69 (+115.63%)
Mutual labels:  fluent
fluent-postgres-driver
🐘 PostgreSQL driver for Fluent.
Stars: ✭ 120 (+275%)
Mutual labels:  fluent
fluent-forward-go
A high-performance Go client for Fluentd and Fluent Bit
Stars: ✭ 26 (-18.75%)
Mutual labels:  fluent
Fluent-Design-For-Web
Windows 10 Inspired UI For Web
Stars: ✭ 28 (-12.5%)
Mutual labels:  fluent
php-underscore
PHP underscore inspired &/or cloned from _.js, with extra goodies like higher order messaging
Stars: ✭ 42 (+31.25%)
Mutual labels:  fluent
Fluent-Random-Picker
Fluent Random Picker is a nice, performant, fluent way to pick random values. Probabilities can be specified, values can be weighted.
Stars: ✭ 26 (-18.75%)
Mutual labels:  fluent
Rise-Media-Player
One media player for everything you own or stream; whether it's music or videos, online or offline Rise Media Player does it all. And it's beautiful and native with the latest version of WinUI.
Stars: ✭ 600 (+1775%)
Mutual labels:  fluent
MediaFlyout
Windows 10+ Media Control Taskbar Flyout
Stars: ✭ 87 (+171.88%)
Mutual labels:  fluent
slf4j-fluent
A fluent api for SLF4J
Stars: ✭ 19 (-40.62%)
Mutual labels:  fluent
fluentcheck
Fluent assertions for Python
Stars: ✭ 79 (+146.88%)
Mutual labels:  fluent
website
Fully responsive website built with NextJS, React and Fluent UI, with the aim of providing services and access to all groups of didactic courses and general purposes to students of the University of Milan.
Stars: ✭ 29 (-9.37%)
Mutual labels:  fluent
mongo-driver
MongoDB driver for Fluent
Stars: ✭ 27 (-15.62%)
Mutual labels:  fluent
angular-odata-es5
OData Service for Angular.io (es5 version)
Stars: ✭ 45 (+40.63%)
Mutual labels:  fluent
cargo-i18n
A Rust Cargo sub-command and libraries to extract and build localization resources to embed in your application/library
Stars: ✭ 88 (+175%)
Mutual labels:  fluent
FluentDNA
FluentDNA allows you to browse sequence data of any size using a zooming visualization similar to Google Maps. You can use FluentDNA as a standalone program or as a python module for your own bioinformatics projects.
Stars: ✭ 52 (+62.5%)
Mutual labels:  fluent
fast-blazor
Blazor component library for FluentUI. Microsoft's official lightweight wrapper around the FluentUI Web Components for use with .NET 6.0 Blazor applications
Stars: ✭ 928 (+2800%)
Mutual labels:  fluent
molten-json
A fluent Java 8 DSL for building JSON documents.
Stars: ✭ 19 (-40.62%)
Mutual labels:  fluent

Validatum

Validatum is an open-source library for building fluent validation functions for .NET.

Install

.NET CLI

dotnet add package Validatum --version 1.1.0

Package Manager

Install-Package Validatum -Version 1.1.0

Platform Support

  • .NET Standard 2.0+
  • .NET Core 2.0+
  • .NET Framework 4.6.1+

Example

// build a validator
var validator = new ValidatorBuilder<Employee>()
    .Required(e => e.FirstName)
    .Email(e => e.Email)
    .For(e => e.LastName, name =>
    {
        name.MinLength(5)
            .Equal("Smithers");
    })
    .Build();

// validate
var result = validator.Validate(
    new Employee
    {
        LastName = "Simpson",
        Email = "homer[at]springfieldnuclear.com"
    }
);

foreach (var rule in result.BrokenRules)
{
    Console.WriteLine($"[{rule.Rule}] {rule.Key}: {rule.Message}");
}

Output

[Required] FirstName: Value is required.
[Email] Email: Value must be a valid email.
[Equal] LastName: Value must equal 'Smithers'.

Why use Validatum?

  • Does not require inheritance of a base type.
  • Define and build functions in the scope that validation will be executed.
  • Define very complex validation logic in a single statement.
  • Easily add custom validators as inline functions.
  • Very small package size ~33KB.
  • Simple and easily extensible API.

Documentation

Please visit https://bsheldrick.github.io/validatum

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].