Adding class ".valid" for messages