You are here

function message_action_create_message_instance_validate in Message 6

Validate the chosen value or php code.

File

includes/message.rules_forms.inc, line 94
Rules configuration forms for the taxonomy module.

Code

function message_action_create_message_instance_validate($form, &$form_state) {
  if (isset($form_state['values']['settings']['code']) && ($php = $form_state['values']['settings']['code'])) {
    if (strpos($php, 'return') === FALSE) {
      form_set_error('code', t('You have to return the default value in the expected format.'));
    }
  }
}