if (code_postal.length == 5 && pattern.test(code_postal) ) {
$('#error_postal').remove();
$('#code_postal').css('border-color', '#80C8EA')
??return true;
} else {
$('#code_postal').css('border-color', 'red')
$('<span style="color:red;font-size:12px" id="error_postal">votre code postal n\'est pas correct</span>').insertAfter($('#code_postal'))
? return false;
} ?
});
$('#btn_step_two').click(function(){
var pattern = /^\d+$/;
var birthday = $('#birthday').val();
if (birthday.length == 4 && pattern.test(birthday)) {
if (birthday > 1900 && birthday < 2005) {
?$('#error_birthday').remove();
$('#birthday').css('border-color', '#80C8EA')
return true;
} else {
$('#error_birthday').remove();
$('<span style="color:red;font-size:12px" id="error_birthday">votre date de naissannce doit être compris entre 1900 et 2005</span>').insertAfter($('#birthday'))
?return false;
}
} else {
$('#birthday').css('border-color', 'red')
$('<span style="color:red;font-size:12px" id="error_birthday">votre date de naissannce n\'est pas correct</span>').insertAfter($('#birthday'))
? return false;
} ?
})
})
</script>
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (