Add support of dot and comma in cost

This commit is contained in:
Benjamin Renard 2014-01-06 02:11:43 +01:00
parent 8a949d3380
commit 1db9f37d04

View file

@ -203,7 +203,7 @@ on_valid_add_contribution_modal=function(e) {
alert('Vous devez saisir un coût !');
return;
}
else if(!RegExp('^[0-9]*(,[0-9]{1,2})*$').test(cost)) {
else if(!RegExp('^[0-9]*((,|\.)[0-9]{1,2})*$').test(cost)) {
$('#add_contribution_cost')[0].focus();
alert('Coût incorrect !');
return;