Hello friends,
I wrote a simple class for string validation and now I want to share with you.
The class contains:
- Constructor(s)
public Validator()
public Validator(string text)
- Properties
private string strText = string.Empty;
- Method(s)
public bool isNullOrEmpty()
public bool isNullOrEmpty(string str)
public bool isLengthMax(int maxLength)
public bool isLengthMin(int minLength)
public bool isLength(int min, int max)
public bool isLengthMax(string str, int maxLength)
public bool isLengthMin(string str, int minLength)
public bool isLength(string str, int min, int max)
public bool isNumber()
public bool isAlpha()
public bool isAlpha(string str)
public bool isAlphaNumeric()
public bool isAlphaNumeric(string str)
public bool isMailValid()
public bool isMailValid(string mail)
public bool isLower()
public bool isLower(string str)
public bool isUpper()
public bool isUpper(string str)
NOTE: The UTF8 strings are not supported.
External link(s):
http://msdn.microsoft.com/en-us/library/system.configuration.stringvalidator.aspx
If you have any comment, suggestion...
Thanks, SkyDriver