validate entity