Revised logic of some validation