Abstract We develop our recent work on quantum error correction (QEC) and entanglement spectrum (ES) in tensor networks (arXiv:1806. 05007). We propose a general framework for planar tensor network state with tensor constraints as a model for AdS 3/CFT 2 correspondence. which could be viewed as a generalization of hyperinvariant tensor networks recently proposed by Evenbly. https://www.ealisboa.com/