Closed speshulk926 closed 7 years ago
I have tested with this code:
@Html.Bootstrap().Div(
Html.Bootstrap().TextBoxFor(x => x.MyFirstNameIs)
.ShowValidationMessage(false)
.Class("filter-name")
.HtmlAttributes(new
{
maxlength = 15,
data_val_required = "custom required val"
})
.Label()
.ShowRequiredStar(true)
).Class("form-group").Sm(3).Md(4)
Inspecting generated html showed attribute: data-val-required="custom required val"
.
Seems to be working as expected. Could you see the generated output of your example?
Man, really sorry. You are right. I had an old version and thought I updated it, but didn't update it for the Website, only the Business layer (which I am not sure why it was even referenced). It is still working. Sorry again!
no problem! Good luck!
I put in an issue about a year ago here and I seem to be having issues making it work again. I wanted to make sure that something didn't get stepped on with another update? I tried something very similar to what I posted and it doesn't seem to work anymore. I made a helper SiteResourceText and SiteResourceHtml which returns string and MvcHtmlString, respectively, that gets text from a database to replace with what is there.
In the database, I have changed the required text to "First Name is so required" where as the default text is "First Name is required".
Does not work:
Works: