var form = document.getElementById('form-body')
var error = []
form.addEventListener('submit', function(e){ e.preventDefault();
var name = document.getElementById('name');
var phone = document.getElementById('phone');
var email = document.getElementById('email');
var bday = document.getElementById('bday');
if (phone.value !== [0]{1}?[9]{1}?[0-9]{9})
alert('Follow the correct format (09XXXXXXXXX)')
})
Aucun commentaire:
Enregistrer un commentaire