validate presense and array of flash messages