v = document.form_name.field_name.value;
if (v.test(/ /g) || v.test(/[A-Z]/g))
alert