十进制类型的实体框架验证。无法验证

时间:2015-01-22 21:47:48

标签: c# asp.net-mvc entity-framework asp.net-mvc-5 entity-framework-6

尝试使用逗号:

  

字段Sum必须是数字。

尝试使用dot:

  

值'123.5'对Sum

无效

型号:

public decimal Sum { get; set; }

查看:

<div class="form-group">
    @Html.LabelFor(model => model.Sum, htmlAttributes: new { @class = "control-label col-md-2" })
    <div class="col-md-10">
        @Html.EditorFor(model => model.Sum, new { htmlAttributes = new { @class = "form-control" } })
        @Html.ValidationMessageFor(model => model.Sum, "", new { @class = "text-danger" })
    </div>
</div>

文化可能有问题吗?

0 个答案:

没有答案
相关问题