JSFiddle - React, Tailwind, and code Playground

by Town

HTML

<input type="text"/>
Valid: <span></span>

JavaScript

$('input').change(function() {
    $('span').html(
        this.value.match(/^[+\-0-9(). ]+$/g) !== null ? "Yes" : "No" 
    );

});