function registration_state_overview_form_validate in Entity Registration 7
Same name and namespace in other branches
- 8.2 includes/registration.forms.inc \registration_state_overview_form_validate()
- 8 includes/registration.forms.inc \registration_state_overview_form_validate()
- 7.2 includes/registration.forms.inc \registration_state_overview_form_validate()
Validation handler for the registration states form.
File
- includes/
registration.forms.inc, line 1004 - Form definitions and callbacks for Registration.
Code
function registration_state_overview_form_validate($form, &$form_state) {
// Ensure each state is only "active" or "pending" – not both.
foreach ($form_state['input']['state'] as $state) {
if ($state['active'] && $state['held']) {
form_set_error('state', 'A state can only be "active" or "held" – not both. Update the "' . $state['label'] . '" state to resolve this warning.');
}
}
}