Adding restriction func to editing section