RockFluid.ScissorsValidation
1.0.1
dotnet add package RockFluid.ScissorsValidation --version 1.0.1
NuGet\Install-Package RockFluid.ScissorsValidation -Version 1.0.1
<PackageReference Include="RockFluid.ScissorsValidation" Version="1.0.1" />
paket add RockFluid.ScissorsValidation --version 1.0.1
#r "nuget: RockFluid.ScissorsValidation, 1.0.1"
// Install RockFluid.ScissorsValidation as a Cake Addin #addin nuget:?package=RockFluid.ScissorsValidation&version=1.0.1 // Install RockFluid.ScissorsValidation as a Cake Tool #tool nuget:?package=RockFluid.ScissorsValidation&version=1.0.1
A validations library for automating both client-side and server-side validations.
Sample usage: Add the validator attributes to the properties of the data record class. These defines the validation rules.
public class Employee
{
[StringValidator("First Name", 5, 50, IsRequired = true)]
public String FirstName { get; set; }
[DoubleValidator("Rating", 0.0, 5.0, IsRequired = true)]
public Single Rating { get; set; }
[DateValidator("Date Employed", "2017-07-05")]
public DateTime DateEmployed { get; set; }
}
To start the validation, call the Validate() function on the class instance that contains data to be validated.
var validation = RockFluid.ScissorValidations.Validator.Validate(p);
The validation result contains information if the validation found issues, with the list of validation results.
Refer to the wiki for how to configure in more detail: https://github.com/johnkevincheng/ScissorValidations/wiki
1.0.1
Validate() overload without need for a mapping dictionary. This can only validate data already copied to the class object, thus cannot validate from the user interface, but can be useful for import sources.
1.0.0
Initial release.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial nuget release.