I have a bool value for which I cannot use default validation at Model stage because in one form it can be false but in another it has to be true. I want that if is true to allow post if not, not
- <div class="col-md-4 text-center">
- <label class="form-control text-white pl-2" style="background-color:firebrick;"> Equipment Available?</label>
- <div class="d-flex justify-content-center mt-3">
- <input asp-for="WOPlanner.ToolsAvailable" type="checkbox" data-width="200" data-toggle="toggle" data-on="Yes" data-off="No" data-onstyle="success" data-offstyle="primary" value="@Model.WOPlanner.ToolsAvailable"/>
- </div>
- </div>
the value I take is from the table which allows false but it should not allow post through
- <div class="row no-gutters border border-0 ">
- <div class="col-md-3 mt-2">
- <button asp-page-handler="WOSchedule" asp-route-womainid="@Model.WOMainID" class="col-md-12 btn btn-link font-weight-bold" style="border-color:firebrick; background-color:lightgray; color:firebrick" type="submit">Submit</button>
- </div>
- </div>