html - Validation error message with exclamation icon in MVC -
i working on mvc 5 view design need error messages displayed exclamation icon/image before, here
is possible @html.validationmessagefor() validation messages,to show exclamation icon/image(responsive)?
i tried adding glyphicon before validation message,
@html.textboxfor(m => m.email, new { @class = "form-control text-line", @placeholder = "email id *" }) <i class="glyphicon glyphicon-exclamation-sign colorred"></i>@html.validationmessagefor(m => m.email, "", new { @class = "text-danger" })
question:
1. implementing above, shows exclamation glyphicon, need displayed when validation error occurs.
2. there other way of using scripts or styles achieving this, custom icon images?
.field-validation-error:before { content: url('../images/image.png'); }
this worked display image when error occurs said stephen muecke
.text-danger{ content: url('../images/image.png'); }
.text-danger class display image if there no error.
Comments
Post a Comment