staplesad / flask_bookclub

1 stars 2 forks source link

Review and book description fields character limit #3

Closed staplesad closed 7 years ago

staplesad commented 7 years ago

The size of these fields are constrained by the database model definitions. It would help if when a user is inputting data to these fields they are informed whether or not they have any further space. Ideally this could be implemented as x/N characters remaining text on the page.

staplesad commented 7 years ago

Implemented this for book info and review text. Can still submit if text goes over the limit though which causes an error. It would be good to prevent the user from doing this. Also on initial loading of page "/N" is displayed. Should be a way to get length of text area (whether 0 or if editing the existing the previous length) and display this initially instead.

staplesad commented 7 years ago

Implemented validation to ensure its not submitted if the text is too long. (on the wrong branch though so will probably merge that soon). Also implemented full display of text length.