display errors when validation failed