//Microsoft Public License (Ms-PL)
//http://c4fdevkit.codeplex.com/license
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
namespace C4F.DevKit.WebServices
{
///
/// Provides useful methods like conversion methods.
///
public static class Utility
{
///
/// Validates the local 4 digit phone number
///
/// Phone number to be validated
/// True, if phone number is valid
public static bool ValidateLocalPhoneNumber(string phone)
{
if (String.IsNullOrEmpty(phone))
return false;
return Regex.IsMatch(phone, "^[0-9]{4}$");
}
}
}