NEAR-DevHub / neardevhub-contract

DevHub Portal Product Contract (Hosted on NEAR Blockchain) – Includes other instances (e.g. Infrastructure, Events)
https://neardevhub.org
19 stars 15 forks source link

Add minimal string length validation rules #40

Closed carina-akaia closed 1 year ago

carina-akaia commented 1 year ago

Closes https://github.com/near/neardevhub-widgets/issues/184

Preview

Testnet: https://test.near.social/#/root.akaia.testnet/widget/gigs-board.pages.community.new?nearDevGovGigsContractAccountId=testhub2.akaia.testnet

frol commented 1 year ago

@ailisp @near-akaia-root FYI, checking .len() of a String checks for the UTF-8 bytes, not characters, so if someone would use Cyrillic letters, they will be limited to 15 characters instead of 30, and Chinese titles will be limited to, I guess, 7 hieroglyphs. It is not an issue yet, but something I wanted to mention