Check if form field contains particular value, if so, do not allow user save I am having a lot of spam signups on a drupal site. I am even using captcha and mollum, but still getting a lot. I have a field that asks 'why are you signing up?' which, when a human user / non-signup signs up, is filled with proper information, however, it seems there are a lot of robots / fake sign ups that all fill the field with a value which is just the literal path to the node field value like why_are_you_Signing_up[und][0][value]. It is always the same. So I thought I could check for this value and cancel the sign up. 
I have looked at hook_user_presave and hook_save. These look like good starting points.
hope I'm not stating the obvious but if your form resides in a template or module you can add server-side validation to the form values using a function like:

function your_form_validate($form, &amp;$form_state) {
  if ($form_state['values']['your_form_field_name']) {
    // Perform PHP validation, and return FALSE if rejected.
  }
}


Also, see Form generation.