validation & errors formatting fix