@using BTCPayServer.Abstractions.Form @using Newtonsoft.Json.Linq @model BTCPayServer.Abstractions.Form.Field @{ var isInvalid = this.ViewContext.ModelState[Model.Name]?.ValidationState is Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState.Invalid; var error = isInvalid ? this.ViewContext.ModelState[Model.Name].Errors[0].ErrorMessage : null; }
@if (Model.Required) { } else { } @if(isInvalid) { @error } @if (!string.IsNullOrEmpty(Model.HelpText)) {
@Model.HelpText
}