title: Regular expression to determine if phone number starts with a zero
body: <p>How would I go about ensuring that numbers entered into a field starts with a 0? My initial question was suggesting that the company wants to force users to input 0 first, but I think an elegant solution would work better.</p>
  <pre class="lang-js prettyprint-override"><code>    function creationValidationNumber(dataValues, setErrors) {
       let testData:any = {};
  
       if (&quot;numberPrime&quot; in dataValues) testData.numberPrime = /^[a-zA-Z][0-9a-zA-Z 
       .,'-]*$/g.test(dataValues.numberPrime) ? &quot;&quot; : &quot;Numbers must start with a 0&quot;;
  
       setErrors({ ...testData });
  
       return Object.values(testData).every((x) =&gt; x === &quot;&quot;);
      }
  </code></pre>
  <p>I just don't know how to get the regular expression to test and throw an error if it doesn't start with <code>0</code></p>
  <p>If anyone could please guide me on the right path.</p>