Check if form field contains particular value, if so, do not allow user save
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.