Пример #1
0
 /// <summary>
 /// Validates phone number length
 /// extracts the digits from a string then confirms that length is 10
 /// </summary>
 public static bool validatePhoneNumber(string sVal)
 {
     return((HKStringUtilities.getOnlyDigitals(sVal).Length == 10) ? true : false);
 }
Пример #2
0
        /// <summary>
        /// Validate USZip Code length
        /// extracts the digits from a string then confirms that length is 5 or 9
        /// </summary>
        public static bool valideUSZipCode(string sVal)
        {
            string sNewVal = HKStringUtilities.getOnlyDigitals(sVal);

            return(((sNewVal.Length == 5) || (sNewVal.Length == 9)) ? true : false);
        }