Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果用户没有选择我们需要显示错误消息的任何一个复选框,但在显示错误消息后对齐不正确,如下图所示,我有工作日的复选框。
您可以将您的复选框验证移动到 @Html.ValidationSummary() (即不要为每个复选框创建 @Html.ValidationMessageFor() ,而是将其显示在单独的 html div 中)