Add support of dot and comma in cost
This commit is contained in:
parent
8a949d3380
commit
1db9f37d04
1 changed files with 1 additions and 1 deletions
|
@ -203,7 +203,7 @@ on_valid_add_contribution_modal=function(e) {
|
||||||
alert('Vous devez saisir un coût !');
|
alert('Vous devez saisir un coût !');
|
||||||
return;
|
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();
|
$('#add_contribution_cost')[0].focus();
|
||||||
alert('Coût incorrect !');
|
alert('Coût incorrect !');
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue