Class Validator
- Namespace
- NuvTools.Validation
- Assembly
- NuvTools.Validation.dll
Validators's class.
public static class Validator- Inheritance
- 
      
      Validator
- Inherited Members
Methods
HasNumbersOnly(string)
Checks if the provided string contains only numeric characters.
public static bool HasNumbersOnly(this string input)Parameters
- inputstring
- The string to check. 
Returns
- bool
- True if the input contains only numeric characters, otherwise false. 
IsDecimalNumber(string, bool, IFormatProvider?)
Checks if the provided string represents a valid decimal number.
public static bool IsDecimalNumber(this string input, bool positiveOnly = false, IFormatProvider? provider = null)Parameters
- inputstring
- The string to check. 
- positiveOnlybool
- If only positive numbers is valid. 
- providerIFormatProvider
- An object that supplies culture-specific parsing information about s. 
Returns
- bool
- True if the input is a valid decimal number, otherwise false. 
IsEmail(string)
Validate the e-mail address.
public static bool IsEmail(this string value)Parameters
- valuestring
- E-mail address 
Returns
IsIntNumber(string, bool)
Checks if the provided string represents a long type number.
public static bool IsIntNumber(this string input, bool positiveOnly = false)Parameters
Returns
- bool
- True if the input is a whole number, otherwise false. 
IsLongNumber(string, bool)
Checks if the provided string represents a long type number.
public static bool IsLongNumber(this string input, bool positiveOnly = false)Parameters
Returns
- bool
- True if the input is a whole number, otherwise false. 
Validate<T>(T)
public static List<string>? Validate<T>(this T obj)Parameters
- objT
Returns
Type Parameters
- T