Skip to content

Enforce all Trips Have the Required Fields #47

Description

@zghera

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions