public bool IsNumeric(string s)
{
bool isnumeric = false;
if (!IsEmptyString(s))
{
try
{
System.Double.Parse(s, System.Globalization.NumberStyles.Any, null);
isnumeric = true;
}
catch
{
isnumeric = false;
}
}
else
{
isnumeric = false;
}
return isnumeric;
}
public override bool IsValid(object value) { ValidationMethods valMethods = new ValidationMethods(); if (value == null) { return true; } string stringICQ = (string)value; if (valMethods.IsNumeric(stringICQ) && stringICQ.Length > 6 && stringICQ.Length < 10) { return true; } else { return false; } }