N1QL Query is returning data even when the dates entered are invalid

We have a requirement where we have to get data between two dates.
We were trying to check what would happen if the dates given were invalid.
We added a few documents with invalid dates.
Document 1 had the date : ‘2019-13-13T12:24:33.852Z’
Document 2 had the date : ‘2019-14-13T15:52:32.931Z’
Now if the N1QL is
“SELECT *
FROM TestBucket testDoc
Where testDoc.createTimestamp >= ‘2018-13-13T00:00:00.000Z’ AND testDoc.createTimestamp <= ‘2019-14-13T15:52:32.931Z’ limit 1”
we’re still getting the two documents mentioned above.

Since the date entered is invalid, how’s this data getting returned.

There is no data type date in JSON. The date is stored in ISO-8601 format is string comparable.
As far as query concerned those are strings and compares string and when matches it returns results.