Added validation check for editing entries, redirect according to success