Hi, you need to skip the form field, only if it contains (only numbers) or (numbers, letters, space, brackets, -, +).
The sequence does not matter. (Lax phone number check).
This template works
!/[^0-9a-z\(\)\-\+\s]/i.test('8(911) 000 00-00'); //true
but the same pattern will miss only letters (as well as only brackets, etc.)
!/[^0-9a-z\(\)\-\+\s]/i.test('test'); //true
I guess that it is necessary to use grouping, but how to do it elegantly and concisely, until I understood.
Tell me the template please. Thank.
/^(?![az]+$)[0-9a-z()+ -]+$/ig
? The question is not completely clear. - Wiktor Stribiżew