membermatters / MemberMatters

An open source membership, access and payments portal for makerspaces and community groups.
https://membermatters.org
MIT License
40 stars 23 forks source link

Unable to register if car registration isn't modified #197

Closed jernejk closed 10 months ago

jernejk commented 1 year ago

Describe the bug Attempting to register at https://portal.brisbanemaker.space/register without filling out the vehicle registration will result in a null ref on validation.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://portal.brisbanemaker.space/register
  2. Fill out the form without touching the vehicle registration
  3. Click on Submit
  4. See error in F12

image

image

Expected behavior We should be able to register without needing to enter optional fields.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context If vehicle registration is not set, the value on line 29 in file formMixin.ts will throw a null reference exception.

I think the code fix would be: return !value || value.toString().length <= 30;

But I'm a bit rusty on TS/React.