Logical error in code

to check bst, when we go left the node data should lie in (minV,maxV) and when we go right it should lie between [minV,maxV).
For example 3<-3->5 is valid bst according to code in video but actually its not.

3
/
3 5
this is a balanced BST

3<-3->5
it is bst as all greater child are on right and all smaller and less than child are on left

3 is parent node, 3 is left child and 5 is right child. Is it balanced?