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.
如果有一个由多个客户使用的使用 asp.net 和 MVC 开发的产品,我如何在每个部署中进行不同的模型验证。说在一种情况下,一个字段是必需的,而另一个不是,或者最大长度是 10 在一个和 15 在另一个?
您可以使用validationattribute,并根据您的客户按需加载