Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for international chars #175

Open
alexandrebini opened this issue Sep 1, 2022 · 1 comment
Open

Support for international chars #175

alexandrebini opened this issue Sep 1, 2022 · 1 comment

Comments

@alexandrebini
Copy link
Contributor

alexandrebini commented Sep 1, 2022

Hi there,

The pattern for validating the token's symbol does not support special chars today:

"symbol": {
"type": "string",
"description": "The symbol for the token; must be alphanumeric",
"pattern": "^[a-zA-Z0-9+\\-%/$.]+$",
"minLength": 1,
"maxLength": 20,
"examples": [
"USDC"
]
},

If you try to use 天津神 you will get a Token list failed validation: .tokens[1].symbol should match pattern "^[a-zA-Z0-9+\-%/$.]+$", but that's actually a valid symbol.

Thx

@alexandrebini
Copy link
Contributor Author

Changing it to ^[\\p{L}+\\-%/$.]+$" or ^[\\S+\\-%/$.]+$" should work. I will try to find time to test it.

ref

alexandrebini added a commit to alexandrebini/token-lists that referenced this issue Sep 7, 2022
alexandrebini added a commit to alexandrebini/token-lists that referenced this issue Oct 10, 2022
alexandrebini added a commit to alexandrebini/token-lists that referenced this issue Oct 10, 2022
zzmp pushed a commit that referenced this issue Dec 12, 2022
* [#175] Add support for symbols containing unicode chars

* [#175] Adding support for empty symbols and names

* [#175] Add support for names containing unicode chars
tiendn pushed a commit to tiendn/token-lists that referenced this issue Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant