I'm trying to validate submitted data against Regex expressions in Firestore Security Rules. I've read through the documentation, but I'm still unsure how to write them.
I read through the Regex documentation here https://firebase.google.com/docs/reference/security/database/regex , but it doesn't really show how to use it in Firestore. I tried using an 'allow validate' rule and copy/pasted a regex expression from the docs, but I'm getting all kinds of errors.
Here's what I tried:
Do I need to put it in a format like this? (From the docs) allow create: if !("ranking" in request.resource.data)
? If so, how do I use a regex expression with it?