#295, #325: Fixed bug, when pressing enter and validation fails in forms