Build a Telephone Number Validator Project - Build a Telephone Number Validator

Tell us what’s happening:

Describe your issue in detail here.
is there any formula or what.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="stylesheet" href="./styles.css" />
         
  </head>
  <body>
    <h1>Telephone Number Validator</h1>
    <input id="user-input">
    <button id="check-btn">Check</button>
    <button id="clear-btn">Clear</button>
    <div id="results-div">
      <p></p></div>  
<script src="script.js"></script> 

  </body>
  </html>  
/* file: styles.css */

/* file: script.js */

const checkBtn = document.getElementById("check-btn");
const input=document.getElementById("user-input");
const clearBtn = document.getElementById("clear-btn");
const result = document.getElementById("results-div");

checkBtn.addEventListener('click', function(){


if(input.value === ""){
    alert("Please provide a phone number");
  }
  
  });

clearBtn.addEventListener('click', function(){
result.innerHTML=""
});



Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

Build a Telephone Number Validator Project - Build a Telephone Number Validator

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.