MediaWiki:Resources/validation.js: Difference between revisions
Content deleted Content added
No edit summary |
Awight (WMF) (talk | contribs) reject all funny punctuation, with a "valid amount" error |
||
Line 34:
if ( form.input_amount_other_box.value != "" ) {
var otherAmount = form.input_amount_other_box.value;
otherAmount = otherAmount.replace(/[,.](\d\d)$/, '
form.input_amount_other_box.value = otherAmount;
form.amountGiven.value = otherAmount;
Line 50 ⟶ 47:
minimums[currency] = 1;
}
if (
$( "#input_amount_other" ).focus();
$( "#input_amount_other_box" ).focus();
alert( '</html>{{int:donate_interface-amount-error}}<html>' );
} else if ( amount < minimums[currency] ) {
$( "#input_amount_other_box" ).val( '' );
$( "#input_amount_other" ).focus();
|