Fix crashed layout when validation message is shown.