function checkNum(string, field, canBeEmpty)
{
	if(string == '') {
		if(!canBeEmpty){
			return "Le champ '" + field + "' est vide!\n";
		} else {
			return '';
		}
	}
	var regex = new RegExp("(^[0-9]*$)", "g");
	if( !regex.test(string) ) {
		return "Le champ '" + field + "' ne doit comporter que des chiffres.\n";
	} else {
		return '';
	}
}
function checkForbiddenChars(string, field, canBeEmpty){
	// champ vide
	if(string == '') {
		if(canBeEmpty) {
			return '';
		} else {
			return "Le champ '" + field + "' est vide.\n";
		}
	}
	// verification
	var regex = /["`'()$;!,<>:=&€|_\\]/;
	if( regex.test(string) ) {
		return "Le champ '" + field + "' contient un des caractères interdits suivants : \"`'()$;!,<>:=&€|_\\\n";
	}else {
		return '';
	}
}
function checkForbiddenChars2(string, field, canBeEmpty){
	// champ vide
	if(string == '') {
		if(canBeEmpty) {
			return '';
		} else {
			return "Le champ '" + field + "' est vide.\n";
		}
	}
	// verification
	var regex = /["`'()$;!,<>:=&€|\\]/;
	if( regex.test(string) ) {
		return "Le champ '" + field + "' contient un des caractères interdits suivants : \"`'()$;!,<>:=&€|_\\\n";
	}else {
		return '';
	}
}
