Created
August 18, 2021 17:04
-
-
Save kamaravichow/a9322f5fdacbc37de047b19a9b29db23 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isValidUpdatedPost(){ | |
let post = request.resource.data; | |
let hasMandatoryFeilds = post.keys().hasAny(['caption','timestamp','published']); | |
let isValid = post.content is string && post.content.size() > 2000; | |
return hasMandatoryFeilds && isValid; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment