Skip to content

Commit

Permalink
Merge pull request #1553 from akash70629/contact-us
Browse files Browse the repository at this point in the history
🛠️Fix: "Name" and "phone" field in the Contact Us page -Validation
  • Loading branch information
rahulkhandait-sde authored Oct 30, 2024
2 parents 2438918 + a5eeb56 commit a13df14
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,9 @@ <h2>Contact Us</h2>
<form id="contactForm">
<div class="tooltip-container">
<label for="name">Enter Your Name</label>
<input type="text" id="name" name="name" placeholder="Your Name" required>
<input type="text" id="name" name="name" placeholder="Your Name" required pattern="[a-zA-Z ]+"
oninvalid="this.setCustomValidity('Please enter your name without using numbers or special characters.')"
oninput="this.setCustomValidity('')">
<div class="tooltip-text">Please enter your full name here.</div>
</div>

Expand All @@ -407,7 +409,8 @@ <h2>Contact Us</h2>

<div class="tooltip-container">
<label for="phone">Enter Your Phone Number</label>
<input type="tel" id="phone" name="phone" placeholder="Your Phone Number" required>
<input type="tel" id="phone" name="phone" placeholder="Your Phone Number" required pattern="[0-9]{10}"
maxlength="10" oninput="this.value = this.value.replace(/[^0-9]/g, '');">
<div class="tooltip-text">Please enter your phone number(10 digits).</div>
</div>

Expand Down Expand Up @@ -517,4 +520,4 @@ <h4>Quick Links</h4>
</script>
</body>

</html>
</html>

0 comments on commit a13df14

Please sign in to comment.