adduser: improve error message for large numeric input

Old message was not as intended:

> Name for the new account: 123123123123
> That's way too much money. Enter 'abort' to abort.

Fixed:

> Name for the new account: 123123123123
Sorry, that's too numeric to be a user name. Enter 'abort' to abort.
This commit is contained in:
Juerd Waalboer 2024-08-28 03:35:19 +02:00
parent 04cf728010
commit f6f5d66bdc
2 changed files with 3 additions and 2 deletions

View file

@ -22,7 +22,7 @@ sub username($self, $cart, $name, @) {
if $name =~ /^[-+*\/\^]/;
return REJECT, "Sorry, that's too numeric to be a user name."
if defined parse_amount($name);
if defined RevBank::Amount->parse_string($name);
return REJECT, "That name is not available."
if defined parse_user($name, 1);