aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-01-19 07:42:37 +0800
committerJacob Evans <jacob@dekz.net>2018-01-19 07:42:37 +0800
commit13ec8ed03cd4423c9b5373e5eabd2d85a9b131f1 (patch)
tree0f7cf6819c4f289d6cf33adc23b295b0e701db9e
parent4ac6e5477dfe648722faa7cdd7b7752ad929d08d (diff)
downloaddexon-sol-tools-13ec8ed03cd4423c9b5373e5eabd2d85a9b131f1.tar.gz
dexon-sol-tools-13ec8ed03cd4423c9b5373e5eabd2d85a9b131f1.tar.zst
dexon-sol-tools-13ec8ed03cd4423c9b5373e5eabd2d85a9b131f1.zip
Allow Token symbols to be alphanumeric
-rw-r--r--packages/website/ts/components/generate_order/new_token_form.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/website/ts/components/generate_order/new_token_form.tsx b/packages/website/ts/components/generate_order/new_token_form.tsx
index b416de168..63645be9a 100644
--- a/packages/website/ts/components/generate_order/new_token_form.tsx
+++ b/packages/website/ts/components/generate_order/new_token_form.tsx
@@ -189,8 +189,8 @@ export class NewTokenForm extends React.Component<NewTokenFormProps, NewTokenFor
const tokenWithSymbolExists = !_.isUndefined(_.find(tokens, { symbol }));
if (symbol === '') {
symbolErrText = 'Symbol is required';
- } else if (!this._isLetters(symbol)) {
- symbolErrText = 'Can only include letters';
+ } else if (!this._isAlphanumeric(symbol)) {
+ symbolErrText = 'Can only include alphanumeric characters';
} else if (symbol.length > maxLength) {
symbolErrText = `Max length is ${maxLength}`;
} else if (tokenWithSymbolExists) {
@@ -231,7 +231,7 @@ export class NewTokenForm extends React.Component<NewTokenFormProps, NewTokenFor
private _isInteger(input: string) {
return /^[0-9]+$/i.test(input);
}
- private _isLetters(input: string) {
- return /^[a-zA-Z]+$/i.test(input);
+ private _isAlphanumeric(input: string) {
+ return /^[a-zA-Z0-9]+$/i.test(input);
}
}
20028240e5963f0ea5ae02f7b08dd61bfcae33'>Reset inactive maintainer who has not responded to email.linimon2006-09-041-1/+1 * Remove USE_REINPLACE from all categories starting with Sedwin2006-05-131-1/+0 * SHA256ifyedwin2006-01-241-0/+1 * At Kris's request, back out the MACHINE_ARCH spelling correction untilobrien2005-04-121-1/+1 * Assist getting more ports working on AMD64 by obeying theobrien2005-04-11