function validation() {
var temp = 0;
function validateEmail($email) {
var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
return emailReg.test($email);
}
var last_name = $("#last_name").val();
var first_name = $("#first_name").val();
var email = $("#email").val();
var phone = $("#phone").val();
// var city = $("#city").val();
// var destination = $("#destination").val();
var start_date = $("#start_date").val();
//var end_date = $("#end_date").val();
if (last_name.trim() == '') {
$("#last_name_error_message").html("Veuillez entrer nom");
temp++;
} else {
$("#last_name_error_message").html("");
}
if (first_name.trim() == '') {
$("#first_name_error_message").html("Veuillez entrer prénom");
temp++;
} else {
$("#first_name_error_message").html("");
}
if (email.trim() == '') {
$("#email1_error_message").html("Veuillez entrer l'e-mail");
temp++;
} else {
$("#email1_error_message").html("");
}
if (!validateEmail(email)) {
$("#email_error_message").html("veuillez saisir une adresse e-mail valide");
temp++;
} else {
$("#email_error_message").html("");
}
if (phone.trim() == '') {
$("#phone_error_message").html("Please enter phone");
temp++;
} else {
$("#phone_error_message").html("");
}
if (start_date.trim() == '') {
$("#start_date_error_message").html("Please enter start date");
temp++;
} else {
$("#start_date_error_message").html("");
}
//if (end_date.trim() == '') {
// $("#end_date_error_message").html("Please enter End date");
// temp++;
// } else {
// $("#end_date_error_message").html("");
// }
if (temp == 0) {
$("#submitBtn1").hide();
return true;
} else {
$("#submitBtn1").show();
return false;
}
}
-->
function addADULTE() {
var divid = $("#addADULTEtextbox > div").length;
$('#addADULTEtextbox').append('
');
$('.datepickerappend').datepicker({
endDate: new Date(),
format: 'dd-mm-yyyy'
});
}
function deleteADULTE(id) {
$('#mainadultediv' + id).remove();
}
function addChild() {
var divid = $("#addchildtextbox > div").length;
$('#addchildtextbox').append('
');
$('.datepickerappend').datepicker({
endDate: new Date(),
format: 'dd-mm-yyyy'
});
}
function deleteChild(id) {
$('#mainchilddiv' + id).remove();
}
==== FIN ADD / DELETE ADULTE / CHILD ==== -->
}
-->