public function checkDate(date:String):Boolean
{
var month:String = "(0?[1-9]|1[012])";
var day:String = "(0?[1-9]|[12][0-9]|3[01])";
var year:String = "([1-9][0-9]{3})";
var separator:String = "([.\/ -]{1})";
var usDate:RegExp = new RegExp("^" + month + separator + day + "\\2" + year + "$");
var ukDate:RegExp = new RegExp("^" + day + separator + month + "\\2" + year + "$");
return (usDate.test(date) || ukDate.test(date) ? true:false);
}