var validators = {};

/* Language specific validators */
validators['phone']   = /^[\d\.\s\-]+$/;
validators['date']    = /^(\d{1,2})\.(\d{1,2})\.(\d{2,4})$/;
validators['time']    = /^(\d{1,2})\:(\d{1,2})\:(\d{1,2})$/;

var 
	msg_correct_the_errors = 'Corectati urmatoarele erori si reincercati',
	msg_required_field = ' este un cāmp obligatoriu',
	msg_not_valid_value = ' nu este o valoare valida',
	msg_allowed_chars = 'Caractere permise pentru',
	msg_are = 'sunt',
	msg_and = 'si',
	msg_the = 'The',
	msg_not_typed_correctly = ' nu a fost reintrodus corect',
	msg_must_be_selected = ' trebuie selectat',
	msg_invalid_extension = ' extensie incorecta! Extensii permise ',
	msg_format_date = ' (formatul datei este zz/ll/aa)';
	msg_format_date_time = ' (formatul datei este zz/ll/aa O:M:S)';

// Day is first in the date, Month is second, Year is third.
function jsvalidator_check_date(RegExp){
	if (RegExp.$2 > 12 || RegExp.$1 > 31) return false; // check allowed ranges	
	var dt_test = new Date(RegExp.$3, Number(RegExp.$2-1), RegExp.$1); // check number of days in month
	if (dt_test.getMonth() != Number(RegExp.$2-1)) return false;
	return true;
}	
