Fix error in displaying validation message