c# - ASP.NET Core - Validation for current value -
i have modal window used register or edit new objects (machines
).
these machines
have property called numdevices
(number of devices).
for purpose of project have validate input wrote property can't less current value
i have this:
<div class="form-group"> <label asp-for="numdevices" class="col-md-2 control-label"></label> <div class="col-md-10"> <input id="numdevices" asp-for="numdevices" class="form-control" /> <span asp-validation-for="numdevices" class="text-danger"></span> </div> </div>
i validate that:
- the new value inserted equal or greater original value
- show errormessage indicating inserted value can't less original value
i'm looking on how can capture current value , add modifications.
thanks in advance help.
will update progress!
Comments
Post a Comment