codeforpdx / PASS

PASS project - with HMIS module integration
MIT License
28 stars 25 forks source link

[Enhancement] - Some forms/modals need beginning and trailing whitespace deleted before running the function #549

Closed xscottxbrownx closed 10 months ago

xscottxbrownx commented 10 months ago

Describe the Current Behavior/Feature:

Noticed this issue on 2 modals/forms: 1. Add Contacts 2. New Message

ADD CONTACTS: If user has a whitespace before or after text in First Name, Last Name, or Username, it does not error but leaves the whitespace in the data - not great.

NEW MESSAGE: If user has a whitespace before the text or after the text in the To: field, it will error.


Proposed Behavior/Feature:

Need to have these inputs validated, and have beginning and trailing whitespace deleted prior to running functions involved.


Rationale:

Not super noticeable to user why failing (due to whitespace)


Additional context:

https://github.com/codeforpdx/PASS/assets/71395931/a96ee9c9-0a26-4bf7-b132-f525301c094d