VRMS icon indicating copy to clipboard operation
VRMS copied to clipboard

Event Name Validation: blacklisted strings

Open pluto-bell opened this issue 1 year ago • 1 comments

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 utils or not, so let me know if I should place it elsewhere.
  • I imported the array into client/src/components/manageProjects/utilities/validateEventForm.js and 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,

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

pluto-bell avatar Oct 24 '24 21:10 pluto-bell

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

github-actions[bot] avatar Oct 24 '24 21:10 github-actions[bot]

@trillium to review

JackHaeg avatar May 07 '25 18:05 JackHaeg