MKValidator.Mohammad_Mukammil
2.0.0
dotnet add package MKValidator.Mohammad_Mukammil --version 2.0.0
NuGet\Install-Package MKValidator.Mohammad_Mukammil -Version 2.0.0
<PackageReference Include="MKValidator.Mohammad_Mukammil" Version="2.0.0" />
paket add MKValidator.Mohammad_Mukammil --version 2.0.0
#r "nuget: MKValidator.Mohammad_Mukammil, 2.0.0"
// Install MKValidator.Mohammad_Mukammil as a Cake Addin #addin nuget:?package=MKValidator.Mohammad_Mukammil&version=2.0.0 // Install MKValidator.Mohammad_Mukammil as a Cake Tool #tool nuget:?package=MKValidator.Mohammad_Mukammil&version=2.0.0
MKTSSolutions.MKValidator
Please follow below steps to use MKValidator
Step 1. Create New Project in visual studio Step 2. Install Nuget Package by using below command in your nuget package manager console
PM>Install-Package MKValidator.Mohammad_Mukammil
Step 3. Now setup is completed and you can use the library like this
Eg. // you can get error message in string variable
string errorMessage; //used for message
using MKValidator; using System;
namespace MkValidatorTest { class MkValidatorTest { static void Main(string[] args) { Employee employee = new Employee(); employee.Name = "Mohd Mukammil"; employee.Email = "abc@gmail.com"; employee.Age = 25; employee.MobileNumber = "7895869325"; employee.Remarks = "Test Remarks";
string errorMessage = string.Empty;
#region Method 1 To Get Error Message
try
{
if(MKValidator.MKValidator.Check<Employee>(employee))
{
// Do your work here
}
}
catch(Exception ex)
{
errorMessage = ex.Message; // Getting Error Message From MKValidator
}
#endregion
#region Method 2 To Get Error Message
if (MKValidator.MKValidator.Check<Employee>(employee,ref errorMessage))
{
// Do your work here
}
Console.WriteLine("Error Message = " + errorMessage);
#endregion
}
public class Employee
{
public int Id { get; set; }
[ValidateRequired] // Required Validation Applied
public string Name { get; set; }
[ValidateEmail] // Email Validation Applied
public string Email { get; set; }
[ValidateRequired] // Required Validation Applied
[ValidateRegularExpression(@"\d||\d.\d")] // Regular Expression Validation Applied
public string Salary { get; set; }
[ValidateLength(11)] // Length Validation Applied
public string MobileNumber { get; set; }
public string Remarks { get; set; }
[ValidateNumber] // Number Validation Applied
[ValidateRange(1, 150)] // Number Range Validation Applied
public int Age { get; set; }
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.4 is compatible. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 was computed. netstandard2.1 was computed. |
.NET Framework | net40 is compatible. net403 was computed. net45 is compatible. net451 was computed. net452 is compatible. net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 1.4
- Microsoft.CSharp (>= 4.4.0)
- NETStandard.Library (>= 1.6.1)
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 |
---|---|---|
2.0.0 | 2,838 | 11/26/2017 |
2.0.0-beta | 823 | 11/20/2017 |
1.0.3 | 1,126 | 11/2/2017 |
1.0.1 | 847 | 10/29/2017 |
1.0.0 | 1,205 | 10/23/2017 |
Now package is available for multiple .net frameworks as well as .net standard.