Altered the isValidTokenDocumentUrl function to include a simple regex url valiation pattern, updated validation.test.js to include new unit tests, and updated warning message to reflect new conditions for token URLs.
Details
Details
- Reviewers
bytesofman - Group Reviewers
Restricted Project - Commits
- rABC4b75fdde4914: [Cashtab] New token URL validation
cd web/cashtab
npm start
navigate to the createToken form
begin inputting url
ensure that if the conditions aren't met, an error message will be displayed
ensure that when the conditions are met, the error message disappears
ensure error message is adequate in CreateTokenForm.js
in a new terminal:
npm test
ensure all tests pass
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
1st level review is green. Need to give Tobias a nudge to update the Document URI handling logic on be.cash's side so it's not recognizing 'www.url.com' URIs as a transaction ID.
Linking D10667 here as a reminder to port over this regex validation for NFT URLs.
web/cashtab/src/components/Tokens/CreateTokenForm.js | ||
---|---|---|
600 ↗ | (On Diff #31330) | Let's tighten this up to make sure it fits on one line. Change to Must be a valid URL. Cannot exceed 68 characters. |