okTurtles / group-income

A decentralized and private (end-to-end encrypted) financial safety net for you and your friends.
https://groupincome.org
GNU Affero General Public License v3.0
331 stars 44 forks source link

Member can leave contributions blank #2396

Closed dotmacro closed 3 weeks ago

dotmacro commented 3 weeks ago

Problem

The IncomeDetails modal ontesting accepts as a valid non-monetary contribution even though space character(s) is not valid for any other required fields. In the screenshot below, this is the blank non-monetary contribution.

On the Contributions view, seems to trigger the proper alerts, as shown in the screenshot, where the user has entered one space char in the field.

contributionSpace

Solution

When the non-monetary contribution field contains only space characters, show the same alert as would be shown if the field were blank. Don't accept only space chars as a valid contribution or add to the list of non-monetary contributions.