Hi Team
I have textbox and before a user leaves its been validated with label error message, now the problem is on the border itself its fading out with being empty in between error label message, who can assist me that this issue not showing this to a user.
- class="row">class="input-group col-md-4 col-md-offset-2 col-sm-2 col-xs-2">class="input-group pull-right">
- ="Email">Email:
- @Html.TextBoxFor(m => m.HomeMainModel.Email, new
- {
- @class = "form-control",
- type = "email",
- id = "inputEmail",
- placeholder = "Email address",
- autofocus = "autofocus"
- })
- class="text-danger" style="display:none">This field is required
class="input-group-append">class="input-group-text"> - script type='text/javascript'>
- $(function () {
- //When the blur event occurs from your Textbox (you lose focus)
- $('#inputEmail').blur(function () {
- var email = document.getElementById("inputEmail").value;
- var expr = /^([\w-\.]+)@@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
- if (!expr.test(email)) {
- document.getElementById("labelMessage").style.display = "inline";
- }
- else {
- document.getElementById("labelMessage").style.display = "none";
- }
- });
- });
- /script>

Jignesh KumarRank #91 · 22.9K reputationPosted Mar 23, 2020, 11:25 PM EDT
Ronika JencyRank #770 · 3K reputationPosted Mar 23, 2020, 3:31 AM EDT
Guest UserRank #877 · 2.5K reputationPosted Mar 23, 2020, 8:54 PM EDT
Amit MohantyRank #112 · 20K reputationPosted Mar 23, 2020, 9:06 PM EDT