I have something like this:
<input type="text" id="number_field" pattern="[-+]?[0-9]*[.,]?[0-9]+" />
I can target custom css if the pattern is not matched using the :invalid selector.
I want to disable a submit button that makes an XHR if all the validation isn't met.
<button class="AdamBrown" onclick="saveAdamBrown(12)">Save</button>
How can I assess whether the pattern is met in Javascript?
inputtagformand using the form'ssubmitevent to know that validation passed.