【发布时间】:2021-03-27 10:40:14
【问题描述】:
当用户输入使step = ".01" 无效时,我需要提供自定义验证消息
目前,验证消息是默认的“请输入 0.01 的倍数”。我该如何更改?
@Html.TextBoxFor(x => x.CostChanges[i].MyVariable, new { @class = "form-control", step = ".01" })
<span asp-validation-for="@Model.CostChanges[i].MyVariable" class="text-danger"></span>
【问题讨论】:
标签: c# html asp.net-core dom razor