public bool ValidateAge(string str) { if (string.IsNullOrEmpty(str)) { return(false); } const int MAX_AGE_POSITION = 2; return(sValidator.IsOnlyDigit(str) && sValidator.LessThanMaxLength(str, MAX_AGE_POSITION)); }
public void NotNull_Test_False() { False(simpleValidator.ContainsDigit(null)); False(simpleValidator.ContainsSpecialCharacter(null)); False(simpleValidator.IsOnlyDigit(null)); False(simpleValidator.StartsFromDigit(null)); False(simpleValidator.ContainsLowwerCharacter(null)); False(simpleValidator.ContainsUpperCharacter(null)); False(simpleValidator.IsLowerCase(null)); False(simpleValidator.IsUpperCase(null)); False(simpleValidator.MatchesRegExp(null, null)); False(simpleValidator.MatchesRegExp(null, "")); False(simpleValidator.MatchesRegExp("", null)); False(simpleValidator.LessThanMaxLength(null, uint.MaxValue)); False(simpleValidator.MoreThanMinLength(null, uint.MaxValue)); False(simpleValidator.LenBeetwen(null, uint.MaxValue, uint.MaxValue)); }