Postman schema validator throwing error for a property to be boolean when it is boolean. Not sure what it complaining about

My question:
We are using an assert like this.
pm.test(‘Schema is valid’, () => {
pm.expect(jsonData).to.have.jsonSchema(schema);
});
It is throwing error message like this:
Schema is valid | AssertionError: expected data to satisfy schema but found following errors: data.parents.legalResidence.residentBefore should be boolean

Here is how the response for this property look like
“legalResidence”: {
“state”: “CA”,
“residentBefore”: true,
“date”: “199002”
},

Here is the schema for this property:
“legalResidence”: {
“type”: “object”,
“properties”: {
“state”: {
“title”: “State”,
“type”: “string”,
“description”: “Student/Parent state of legal residence.”
},
“residentBefore”: {
“title”: “ResidentBefore”,
“type”: “boolean”,
“description”: “Student/Parent is a resident before a set date that increments every year.”
},
“date”: {
“title”: “Date”,
“type”: “string”,
“description”: “Student/Parent date of legal residence.”
}
}
},

Details (like screenshots):
As you can see, the property is a boolean in the response so we are not sure why postman schema validator is complaining. It is just complaining for all the boolean properties in the schema. When we use online schema validator like JSON Schema Validator - Newtonsoft it does not throw any error.

If you post code or JSON response, please use the preformatted text option in the editor so everything doesn’t align to the left.

It’s nearly impossible to read your JSON without the correct formatting.

Can you also include all of the code. Including exactly how you defined the schema in your code.

The following passes without errors and fails if I change the value to a string.

let jsonData = {
    "legalResidence": {
        "state": "CA",
        "residentBefore": true,
        "date": "199002"
        }
}

const schema = {
    'type': 'object',
    'properties': {
        'state': {
            type: 'string'
        },
        'residentBefore': {
            type: 'boolean'
        },
        'date': {
            type: 'string'
        }
    },
    required: ['state', 'residentBefore', 'date']
};

pm.test("Schema is valid", () => {
    pm.expect(jsonData.legalResidence).to.have.jsonSchema(schema);
});