I have a form in mvc where different fields settings are controlled from database.
I have written a razor function which checks if certain fields are mandatory.
In case of true I need to set the required attribute. Currently I can't call razor function in input tag.
What are my options?
<input type="text" class="form-control" asp-for="@Model.Title" required="@myfunction()" maxlength="200" />

