'how to apply fluent validation for server side
here I used client side validation its working fine but i also need to apply server side validation
if (_eaches > _receivedCases) {
$("#EachesMessage_" + index).css("display", "block");
$("#EachesMessage_" + index).text("* Shouldn't be greater than received cases");
} else if (_eaches <= _receivedCases) {
$("#EachesMessage_" + index).css("display", "none");
}
<td>
@Html.TextBoxFor(x => x.Items[i].ReceivedNumberOfCases, new { @class = "form-control text-right", @id="Received_"+ i ,@onkeyup = "outer.onChangeReceived("+ i +")" ,onkeypress="return fnAllowNumeric()"}) @Html.ValidationMessageFor(x=>x.Items[i].ReceivedNumberOfCases,null,new{@class="text-danger",@id="recivedCasesMessage_"+i })
</td>
<td>
@Html.TextBoxFor(x=>x.Items[i].DamagedProductsByEaches, new { @class = "form-control text-right Eaches", @id="Eaches_"+ i ,@onkeyup = "outer.onChangeEachers("+ i +")", @min="0" }) @Html.ValidationMessageFor(x=>x.Items[i].DamagedProductsByEaches,null,new{@class="text-danger",@id="EachesMessage_"+i })
</td>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
