gamedaoco / gamedao-beta

https://beta.gamedao.co
Apache License 2.0
9 stars 1 forks source link

Proposals fields has no limitation for size. #268

Open cryply opened 2 years ago

cryply commented 2 years ago

Describe the bug FE does not restrict from entering super long strings in Proposal

To Reproduce Steps to reproduce the behavior:

  1. Go to DAO you belongs
  2. Click on Create Proposal
  3. Fill up many Proposal Title and Proposal Content Description with long string
  4. Click on Publish Proposal
  5. See that FE take long time due to fact that its actually sending this Loremipsum to BE.

Expected behavior Length of Title and Description must be limited.

Screenshots image

Additional context I was also not authorize to Publish is it due to fact that DAO not mine? But I guess any member of DAO can make proposal...

DarkNebula0 commented 2 years ago

@2075 Here come up 2 new questions :)

  1. What is the maximum length of the text
  2. When is a member allowed to create a proposal or what kind of restriction is there?
soundyogi commented 2 years ago

I think 48bytes. if(new Blob([values.title]).size > 48) errors.title = 'Please enter a maximum of 48 bytes.' I used this one in Campaigns ^

(I hope I have validation done for proposals soon working again)

cryply commented 2 years ago

utf-8 can be up to 4 bytes per character

2075 commented 2 years ago

yeah, the field validations should possibly come from a lib providing this, internationalisation?

2075 commented 2 years ago

@DarkNebula0

all up for discussion