Skip to content

trim values before accessing DB#1499

Merged
bkmorgan3 merged 1 commit intohackforla:developmentfrom
bkmorgan3:1402/project-field-trim-trailing-space
Sep 5, 2023
Merged

trim values before accessing DB#1499
bkmorgan3 merged 1 commit intohackforla:developmentfrom
bkmorgan3:1402/project-field-trim-trailing-space

Conversation

@bkmorgan3
Copy link
Member

Fixes #1402

What changes did you make and why did you make them ?

  • On the Project Model for each input that correlates to a Project Field on the add / edit form I added a trim property to remove extra white space on both ends of the value.
  • Added to the Model because if a user bypasses the UI through Postman or something, the values are still trimmed and it places the burden of doing the work on the DB - as light as an operation as it is.

No Screenshots but you confirm this works by Adding and Editing a project with spaces and checking the project in Mongo Compass.

@github-actions
Copy link

github-actions bot commented Sep 4, 2023

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 bkmorgan3-1402/project-field-trim-trailing-space development
git pull https://github.com/bkmorgan3/VRMS.git 1402/project-field-trim-trailing-space

Copy link
Member

@trillium trillium left a comment

Choose a reason for hiding this comment

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

Works, thanks @bkmorgan3 !

@bkmorgan3 bkmorgan3 merged commit dbba2be into hackforla:development Sep 5, 2023
trillium pushed a commit to trillium/VRMS that referenced this pull request Mar 4, 2024
Co-authored-by: Brad <brad@brads-mbp.lan>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trim trailing spaces of all fields

2 participants