 		var dateObj:Object = {day:"", month:"", year:""};
 		
 		var dayProp:String = baseField;
+		var monthProp:String = baseField;
 		var yearProp:String = baseField;
-		var monthProp:String = baseField;
-
-		var advanceValueCounter:Boolean = true;
+		
+		var dateParts:Array = [];
+		var formatParts:Array = [];
+		
+		var dayPart:String = "";
+		var monthPart:String = "";
+		var yearPart:String = "";
+
 		var monthRequired:Boolean = false;
 		var dayRequired:Boolean = false
 		var yearRequired:Boolean = false;

		var i:int;
		var temp:String;
		
		
		if (allowedFormatChars != null)
			n = allowedFormatChars.length;
		
		for (i = 0; i < n; i++)
		{
			if (DECIMAL_DIGITS.indexOf(allowedFormatChars.charAt(i)) != -1)
			{
				var message:String = resourceManager.getString(
					"validators", "invalidFormatChars");
				throw new Error(message);
			}
		}
		
		if (value is String)

			}
			else
			{
				var lastStringChar:String = "";
				n = stringValue.length;
				part = -1;
				for (i = 0; i < n; i++)
				{
					var stringChar:String = stringValue.charAt(i);
					var lastIsDigit:Boolean = (DECIMAL_DIGITS.indexOf(lastStringChar) >= 0)
						&& (lastStringChar != "");
					var curentIsDigit:Boolean = (DECIMAL_DIGITS.indexOf(stringChar) >= 0);
					
					if (lastIsDigit != curentIsDigit)
					{
						part++;
						dateParts[part] = stringChar;
					}
					else if (validInput.indexOf(stringChar) == -1)
					{
						results.push(new ValidationResult(
							true, baseField, "invalidChar", 
							validator.invalidCharError));
						return results;
					}
					else
					{
						dateParts[part] += stringChar;
					}

					lastStringChar = stringChar;
				}
				
				if (formatParts.length != dateParts.length)
				{
					results.push(new ValidationResult(
						true, baseField, "wrongLength", 
						validator.wrongLengthError + " " + inputFormat));
					return results;
				}

				var j:int = 0;
				n = formatParts.length;
				for (part = 0; part < n; part++)
				{
					var mask:String = formatParts[part].charAt(0);

					if ( mask == "D")
					{
						dateObj.day = dateParts[part];
						dayPart = formatParts[part];
					}
					else if (mask == "M")
					{
						dateObj.month = dateParts[part];
						monthPart = formatParts[part];
					}
					else if (mask == "Y")
					{
						dateObj.year = dateParts[part];
						yearPart = formatParts[part];
					}
				}
				
				// DD or D format
				if ((dayRequired && dayPart.length == 2 && dateObj.day.length != 2)
					|| (dayRequired && dayPart.length == 1 && dateObj.day.length > 2))
				{
					results.push(new ValidationResult(
						true, baseField, "wrongLength", 
						validator.wrongLengthError + " " + inputFormat));	
				}
				// MM or M format
				if ((monthRequired && monthPart.length == 2 && dateObj.month.length != 2)
					|| (monthRequired && monthPart.length == 1 && dateObj.month.length > 2))
				{
					results.push(new ValidationResult(
						true, baseField, "wrongLength", 
						validator.wrongLengthError + " " + inputFormat));	
				}
				// YY or YYYY format
				if ((yearRequired && yearPart.length == 2 && dateObj.year.length != 2)
					|| (yearRequired && yearPart.length == 4 && dateObj.year.length != 4))
				{
					results.push(new ValidationResult(
						true, baseField, "wrongLength", 
						validator.wrongLengthError + " " + inputFormat));	
				}
						
				if ((monthRequired && dateObj.month == "") ||
					(dayRequired && dateObj.day == "") ||
					(yearRequired && dateObj.year == ""))
				 {
				 	results.push(new ValidationResult(
						true, baseField, "wrongLength", 
