JSFiddle - React, Tailwind, and code Playground

JavaScript

var regex = /^0[012345689]\d{9}$/,
    tests = ['01234567890',
             '07234567890',
             '11234567890',
             '012345',
             'asdf'];

for (var idx = 0; idx < tests.length; idx += 1) {
    document.write(tests[idx] + ' = ' + regex.test(tests[idx]) + '<br />')
}