mvc中的日期验证 [英] date validation in mvc
本文介绍了mvc中的日期验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好b $ b
如何在mvc中验证日期字段?
我们有[必需],但我想验证日期字段特定范围。
谢谢
Hi
How can i validate a date field in mvc?
we have the [Required], but I want to validate the date field for a specific range.
thanks
推荐答案
尝试范围验证器。 [ ^ ]
1)论坛asp.net [ ^ ]
2) date-format-in-rangevalidator [ ^ ]
MVC中的验证。
1)http://stackoverflow.com/questions/9733068/mvc-model-range-validator [ ^ ]
2)asp-net-mvc-2-model-validation [ ^ ]
3)http://forums.asp.net/t/1637616.aspx [ ^ ]
Try Range Validator.[^]
1) forums asp.net[^]
2) date-format-in-rangevalidator[^]
Validations in MVC.
1) http://stackoverflow.com/questions/9733068/mvc-model-range-validator[^]
2) asp-net-mvc-2-model-validation[^]
3) http://forums.asp.net/t/1637616.aspx[^]
if (person.Name.Trim().Length == 0)
{
ModelState.AddModelError("Name", "Name is required.");
}
http://msdn.microsoft.com/en-us/library/dd410404(v = vs.90).aspx [ ^ ]
http://msdn.microsoft.com/en-us/library/ee256141(v=vs.100)。 aspx [ ^ ]
请通过此链接。
http://msdn.microsoft.com/en-us/library/dd410404(v=vs.90).aspx[^]
http://msdn.microsoft.com/en-us/library/ee256141(v=vs.100).aspx[^]
Please go through this link.
这篇关于mvc中的日期验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文