function doValidation_fnc () { errfound = false ; if ( ! ValidLength (trim_str (document.getElementById('contactname').value), 2) ) error ('Anda harus memasukkan `Nama`', document.getElementById('contactname'), true, false) ; if ( ! valid_email (document.getElementById('contactemail').value) ) error ('Anda harus memasukkan `Email`', document.getElementById('contactemail'), true, false) ; if ( ! ValidLength (trim_str (document.getElementById('contactsubject').value), 3) ) error ('Anda harus memasukkan `Judul`', document.getElementById('contactsubject'), true, false) ; if ( ! ValidLength (trim_str (document.getElementById('contactmessage').value), 10) ) error ('Anda harus memasukkan `Pesan`', document.getElementById('contactmessage'), true, false) ; if ( ! errfound ) { if ( confirm ('Apakah data ini sudah diperiksa dengan benar ?') ) { return true ; } else { return false ; } } else { return false ; } }