問題:
I want to get all the error messages out of the modelState without knowing the key values.我想在不知道鍵值的情況下從 modelState 中獲取所有錯誤消息。 Looping through to grab all the error messages that the ModelState contains.循環獲取 ModelState 包含的所有錯誤消息。
How can I do this?我怎樣才能做到這一點?
解決方案:
參考一: https://en.stackoom.com/question/5fxk參考二: https://stackoom.com/question/5fxk