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

add client side validation #8723

Merged
merged 4 commits into from
Mar 31, 2021
Merged

Conversation

thelostone-mc
Copy link
Member

Description
  • update placeholder to let folks know to enter chain address
  • added client side validation for chains when user submits work
Refers/Fixes

Screenshot 2021-03-29 at 7 10 34 PM

Screenshot 2021-03-29 at 7 11 25 PM

app/assets/v2/js/pages/fulfill_bounty/token.js Outdated Show resolved Hide resolved
case 'qr':

if (token_name == 'BTC') {
if (address.toLowerCase().startsWith('0x')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does BTC start with 0x ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is displaying the error when a BTC address starts with 0x 👍

Copy link
Contributor

@gdixon gdixon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth moving this error state reporting to the method we use in the style guide?
http://localhost:8000/styleguide/components

It will mean we need to write up data-patterns for each of the chains so that we can properly toggle the ::invalid state, but it would add consistency. Bounty creation currently follows this pattern if you want to have a look at how its working atm.

@thelostone-mc thelostone-mc requested a review from chibie March 30, 2021 10:10
@thelostone-mc
Copy link
Member Author

thelostone-mc commented Mar 30, 2021

@gdixon done

image

Copy link
Contributor

@gdixon gdixon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!! LGTM! 😃

@thelostone-mc thelostone-mc merged commit e0d9810 into gitcoinco:master Mar 31, 2021
iRhonin pushed a commit to iRhonin/web that referenced this pull request Apr 23, 2021
* add client side validation

* address feedback

* address feedback

* address feedback
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

Successfully merging this pull request may close these issues.

3 participants