Skip to content

Commit

Permalink
Merge pull request #1127 from akash70629/name
Browse files Browse the repository at this point in the history
🛠️FIX : Join the conversation - Name field validation
  • Loading branch information
hiteashgupta1 authored Oct 18, 2024
2 parents cec50eb + 6e4080f commit 9d92da8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,9 @@ <h2 class="section-title">
<h3 class="form-title">Share Your Thoughts</h3>
<form id="commentForm" class="form-content">
<div class="input-container">
<input type="text" id="commenterName" class="input-field" placeholder=" " required>
<input type="text" id="commenterName" class="input-field" placeholder=" " required pattern="[a-zA-Z ]+"
oninvalid="this.setCustomValidity('Numbers and Symbols are not allowed')"
oninput="this.setCustomValidity('')">
<label for="commenterName" class="input-label">Your Name</label>
</div>
<div class="input-container">
Expand Down Expand Up @@ -765,7 +767,7 @@ <h5 class="commenter-name">${comment.name}</h5>

.input-label {
position: absolute;
left: 16px;
left: 8px;
top: 12px;
color: #6b7280;
transition: all 0.3s;
Expand All @@ -775,7 +777,7 @@ <h5 class="commenter-name">${comment.name}</h5>
.input-field:focus + .input-label,
.input-field:not(:placeholder-shown) + .input-label {
font-size: 0.875rem;
top: -10px;
top: -17px;
color: #f4978e;
}

Expand Down

1 comment on commit 9d92da8

@vercel
Copy link

@vercel vercel bot commented on 9d92da8 Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.