/// <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); }
/// <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); }