Because you have another JS script loaded via GTM (you must keep track of those!) that's overriding the validation and setting the form back to submittable.
No idea what the above is supposed to do, but you need to make sure all your custom form behaviors cooperate with each other.
Is there a way to require the number to be real and US based? I can lock it to 10 digits, but will that ensure it is an actual us based phone number?
You can't do this validation with Marketo alone. There are various remote services that can do so — for example, the Twilio Lookup API.
Thank you for your code - it works. But I'm running into an issue where if it's on a landing page template that hosts multiple different forms without phone number as a field, the form will not submit. Is there someway to alter the code to be conditional to run only if phone number is in the form? Thanks!
Perfect - thank you!