我有2列在UI中輸入。如何根據ASP.NET MVC3中的錯誤消息和條件的這兩列給出正則表達式?將jQuery驗證轉換爲ASP.NET MVC驗證
的條件是jQuery中,我遷移到MVC3方:
if (((new Date(Date.parse($("#hupUnempBftsEndDate").val()) - Date.parse($("#hupUnempBftsBeginDate").val())))/86400000) < 0) {
validationSummary = validationSummary + "! End Date of Unemployment Benefits can't be prior to Effective Date of Unemployment Benefits. \n";
.NET代碼:
public DateTime? BeginDate { get; set; }
public DateTime? EndDate { get; set; }
感謝達林....我寫了一個自定義的驗證。! – user1169594