function tripal_feature_add_ONE_property_form_validate
1.x tripal_feature-properties.inc | tripal_feature_add_ONE_property_form_validate($form, &$form_state) |
Related topics
File
- tripal_feature/
includes/ tripal_feature-properties.inc, line 102 - @todo Add file header description
Code
function tripal_feature_add_ONE_property_form_validate($form, &$form_state) {
// Only Require if Adding Property
if ($form_state['clicked_button']['#value'] == t('Add Property')) {
// Check that there is a feature
if ($form_state['values']['feature_id'] <= 0) {
form_set_error('feature_id', 'There is no associated feature.');
}
// Check that Selected a type
if (!$form_state['values']['property']) {
form_set_error('property', 'Please select a type of property.');
}
}
}