this code wants to forbid the sizure of another dot(.) or (,), your fiels accepts only one dot(.) or (,)
$('#montant-total').keypress(function(event){
var montantVal = $(this).val();
if (montantVal.indexOf(".") >= 0){
var charCode = event.which;
if (charCode == 44 || charCode == 46) { return false; }
}
});