Check out a free preview of the full Firebase with React, v2 course:
The "Validating Data Exercise" Lesson is part of the full, Firebase with React, v2 course featured in this preview video. Here's what you'd learn in this lesson:

Students are instructed to create a security rule that validates whether the title of a post is null, and rejects it if it is.

Get Unlimited Access Now

Transcript from the "Validating Data Exercise" Lesson

[00:00:00]
>> Steve: What I want you to try now, is we saw that we can look at the given resource. What we wanna do, is we wanna make sure that the title is not null, right? So we saw that, if we look at our rules,
>> Steve: We know that we can look at the resource, and then we have the request resource is the one coming in.

[00:00:26] We know how to check if something's not null on creation, or really, any right if you wanted to, but let's go with creation. On creation, we want to make sure that the title is not null, otherwise we will reject it coming into the database.