diff options
author | Jacob Evans <dekz@dekz.net> | 2018-01-19 10:41:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-19 10:41:29 +0800 |
commit | a81f6f9ad13d16258bb924896951917435107e74 (patch) | |
tree | 217adc5e571284f9a596fa2dbd95a72705c1d1e9 /packages | |
parent | 8a80b10cc231d1bc3037ff577f3a3fd897b499a3 (diff) | |
parent | 13ec8ed03cd4423c9b5373e5eabd2d85a9b131f1 (diff) | |
download | dexon-sol-tools-a81f6f9ad13d16258bb924896951917435107e74.tar.gz dexon-sol-tools-a81f6f9ad13d16258bb924896951917435107e74.tar.zst dexon-sol-tools-a81f6f9ad13d16258bb924896951917435107e74.zip |
Merge pull request #328 from 0xProject/fix/website/alphanumeric-token-symbol
Allow Token symbols to be alphanumeric
Diffstat (limited to 'packages')
-rw-r--r-- | packages/website/ts/components/generate_order/new_token_form.tsx | 8 |
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); } } |