Among the issues of Imsak and Iftar

Is Sawm observed by a person abandoning Salah considered valid?