條件驗證屬性我正在尋找一些關于實現驗證屬性的最佳方法的建議,該屬性執行以下操作。模型public class MyInputModel {
[Required]
public int Id {get;set;}
public string MyProperty1 {get;set;}
public string MyProperty2 {get;set;}
public bool MyProperty3 {get;set;}}我希望至少具有一個值的pro1pro2pro3,如果pro3是唯一填充的值,它不應該等于false。如何編寫驗證屬性?為了這個?謝謝你的幫助!
- 3 回答
- 0 關注
- 363 瀏覽
添加回答
舉報
0/150
提交
取消