11

I've read multiple questions in Stack Overflow and the documentation but I couldn't find multiple validations that I can imagine that exist.

Per example, it is possible to check if request.resource.data.description is string but can is it possible to do the same when it comes to number, float, timestamp or even array/list? I couldn't even find the string one in the documentation so I can imagine it is missing more than just that one.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
André
  • 703
  • 1
  • 6
  • 18

1 Answers1

36

You might want to watch my video on data types in Firebase security rules. In it, I list all the different data types that you can check:

value is bool
value is int
value is float
value is number
value is string

value is list
value is map

value is timestamp
value is duration
value is path
value is latlng
Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441