NoRegex

Validation easy and simple to use, with single classes you define what you need in a string.

Required netstandard2.0 or .Net Framework 4.6.1

If it is necessary to replicate logic or to add more steps for validation, it is enough to seal the NoRegex class with new parameters more than once








Is this label See if is valid or not:




About Current Version 2.0.0



- Added new method in library IsValid Double(value (str), double minimum, double maximum, ref double returnValue) an overload of Double (value (str)).

About Current Previous Version



- Added new method in library IsValid Double(value (str), double minimum, double maximum) an overload of Double (value (str)).
- Added new method in library IsValid Double (value (str)).
- Added new method in library IsValid Integer(value (str), int minimum, int maximum, ref int returnValue) an overload of Integer (value (str)).
- Added new method in library IsValid Integer(value (str), ref int returnValue) an overload of Integer (value (str)).
- Added new method in library IsValid Integer(value (str), minimum (int), maximum (int)) an overload of Integer (value (str)).
- Added new method "Integer" in IsValid library.
- Added new "IsValid" library with the Email function, which does the validation automatically without the need to create rules.
- Added new non-mandatory item for validation ("RepeatValueAfterAtMaximum", "RepeatValueBeforeAtMaximum") in "ContainsAfter" and "ContainsBefore".
- Add new possibilities for validation "ContainsAfter" and "ContainsBefore" to facilitate email validation.

Email Example




Code:

Here's how to validate Email using the newly created IsValid library inside of NoRegex:

bool isValid = IsValid.Email("ezequiel@laavor.com");


Here's how to validate Email using the normal NoRegex:

NoRegex noRegexEmailPartArroba = new NoRegex();

noRegexEmailPartArroba.RepeatAtMaximum.Value = "@";
noRegexEmailPartArroba.RepeatAtMaximum.IgnoreCase = true;
noRegexEmailPartArroba.RepeatAtMaximum.Amount = 1;

noRegexEmailPartArroba.ContainsBefore.Value = "@";
noRegexEmailPartArroba.ContainsBefore.CompellingLetters = true;
noRegexEmailPartArroba.ContainsBefore.AmountCharacters = 1;
noRegexEmailPartArroba.ContainsBefore.IgnoreCase = true;

noRegexEmailPartArroba.ContainsAfter.Value = "@";
noRegexEmailPartArroba.ContainsAfter.CompellingLetters = true;
noRegexEmailPartArroba.ContainsAfter.IgnoreCase = true;
noRegexEmailPartArroba.ContainsAfter.AmountCharacters = 6;
noRegexEmailPartArroba.ContainsAfter.ValueAfter = ".";
noRegexEmailPartArroba.ContainsAfter.RepeatValueAfterAtMaximum = 1;

noRegexEmailPartArroba.DoesNotContain.Value = "..";
noRegexEmailPartArroba.DoesNotContain.IgnoreCase = true;

var isValidEmail = noRegexEmailPartArroba.Validate(emailValidation);

if (isValidEmail)
{
     string second = emailValidation.Split('@')[1];

     NoRegex noRegexEmailPartDot = new NoRegex();

     noRegexEmailPartDot.ContainsBefore.Value = ".";
     noRegexEmailPartDot.ContainsBefore.CompellingLetters = true;
     noRegexEmailPartDot.ContainsBefore.AmountCharacters = 2;
     noRegexEmailPartDot.ContainsBefore.IgnoreCase = true;

     noRegexEmailPartDot.ContainsAfter.Value = ".";
     noRegexEmailPartDot.ContainsAfter.CompellingLetters = true;
     noRegexEmailPartDot.ContainsAfter.AmountCharacters = 2;
     noRegexEmailPartDot.ContainsAfter.IgnoreCase = true;

     isValidEmail = noRegexEmailPartDot.Validate(second);
}

Text Example




Code:
NoRegex noRegex = new NoRegex();
noRegex.StartWith.Value = "lAAVOR";
noRegex.StartWith.IgnoreCase = true;
noRegex.EndsWith.Value = "ezequiel";
noRegex.EndsWith.IgnoreCase = false;
noRegex.Contains.Value = "Try";
noRegex.Contains.IgnoreCase = true;
noRegex.MinimumCharacters = 23;
noRegex.MaximumCharacters = 27;
noRegex.DoesNotContain.Value = "hard";
noRegex.DoesNotContain.IgnoreCase = true;
noRegex.RepeatAtLeast.IgnoreCase = true;
noRegex.RepeatAtLeast.Value = "rt";
noRegex.RepeatAtLeast.Amount = 2;
noRegex.RepeatAtMaximum.IgnoreCase = true;
noRegex.RepeatAtMaximum.Value = "rt";
noRegex.RepeatAtMaximum.Amount = 2;
noRegex.MinimumSpecialCharacters = 2;
noRegex.MaximumSpecialCharacters = 3;
noRegex.CompellingCaps = true;
noRegex.CompellingLowercase = true;
noRegex.CompellingNumbers = true;
var isValid = noRegex.Validate(textValidation);

Examples Download




All examples are projects of the Xamarin platform with the component already with "dll" available. They are intended for those who already know how to work with the Framework and have Microsoft's Visual Studio installed, you can download Laavor components via Nuget.org or the package manager.

Asp.Net

MVC

WPF

Xamarin

Documentation



Available in pdf

Documentation download