﻿var msg = "Certains champs obligatoires (*) ne sont pas remplis"; function ValidateMyForm() { dataForm.prenom.className = 'contact'; dataForm.cp.className = 'contact'; if (dataForm.prenom.value.length < 1) { alert(msg); dataForm.prenom.className = 'contactErr'; return false } if (dataForm.cp.value.length < 1) { alert(msg); dataForm.cp.className = 'contactErr'; return false } return true }