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

Enforce all Trips Have the Required Fields #47

Open
zghera opened this issue Jul 10, 2020 · 0 comments
Open

Enforce all Trips Have the Required Fields #47

zghera opened this issue Jul 10, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@zghera
Copy link
Collaborator

zghera commented Jul 10, 2020

Issue summary

We want to ensure that every Trip document contains required fields that will be used when displaying trips (title, destination, collaborators, etc.). This way, no error checking needs to be done when fetching the documents and rendering them to the UI.

Firebase natively does not support required fields, but this type of rule might be enforceable using Firebase security rules. A rule could be added that only allows documents to be written to the Trips collection if it contains with specific fields.

Expected behavior

Every Trip document should contain the fields name, description, destination, start date, end date, and collaborators.

Actual behavior

It is possible for Trip documents to not contain one of the fields mentioned above.

Steps to reproduce (including any preconditions)

n/a

Screenshot/screencast of this problem (if possible)

n/a

Your environment

n/a

@zghera zghera added the enhancement New feature or request label Jul 10, 2020
@zghera zghera self-assigned this Jul 10, 2020
This was referenced Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant