Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Name Validation: blacklisted strings #1805

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

pluto-bell
Copy link
Member

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 Evn validation 1403 #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
before-new-validation-vrms.mov
Screen Capture after changes are applied
event-name-validation-vrms.mov

Copy link

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

Copy link
Member

@nora-zajzon nora-zajzon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great! All the names/strings specified in the issue are not useable regardless of capitalization.

@pluto-bell pluto-bell added the ready for dev lead Add to issue when dev lead needs to take some action label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for dev lead Add to issue when dev lead needs to take some action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a validation limiting event names from certain strings
2 participants