Event Name Validation: blacklisted strings
Fixes #1514
What changes did you make and why did you make them ?
-
Added a new file,
client/src/utils/blacklist.js, to hold array of strings that cannot be used in event names. I made the file name general so that future blacklists can be added here.- I wasn't positive if the file should be located under
utilsor not, so let me know if I should place it elsewhere.
- I wasn't positive if the file should be located under
-
I imported the array into
client/src/components/manageProjects/utilities/validateEventForm.jsand implemented it into the framework used by https://github.com/hackforla/VRMS/pull/1440- I decided to adjust the util function created in the above PR so that it returns the found word(s).
- I did this to make our error message more dynamic. Previously it was hardcoded:
- Previous error message:
Event name cannot contain 'meeting' or 'mtg' or the project name,
- Previous error message:
Screen Captures of Proposed Changes
Screen Capture before changes are applied
https://github.com/user-attachments/assets/a1628ad7-8368-43d3-9d35-e82d26f37208
Screen Capture after changes are applied
https://github.com/user-attachments/assets/2c29f5ba-f34a-4d03-b49b-aba9d8d60d80
Want to review this pull request? Take a look at this documentation for a step by step guide!
From your project repository, check out a new branch and test the changes.
git checkout -b pluto-bell-limit-event-names-from-certain-strings-1514 development
git pull https://github.com/pluto-bell/VRMS.git limit-event-names-from-certain-strings-1514
@trillium to review