public function EntityformTypeFormController::validate in Entityform 8.2
File
- lib/
Drupal/ entityform/ EntityformTypeFormController.php, line 106 - Contains \Drupal\entityform\EntityformTypeFormController.
Class
- EntityformTypeFormController
- Form controller for entityform type forms.
Namespace
Drupal\entityformCode
public function validate(array $form, array &$form_state) {
parent::validate($form, $form_state);
$id = trim($form_state['values']['type']);
// '0' is invalid, since elsewhere we check it using empty().
if ($id == '0') {
form_set_error('type', t("Invalid machine-readable name. Enter a name other than %invalid.", array(
'%invalid' => $id,
)));
}
}