function nodewords_edit_attributes_validate_save in Nodewords: D6 Meta Tags 6.2
'Save attributes' validate handler.
1 string reference to 'nodewords_edit_attributes_validate_save'
- nodewords_edit_attributes in ./
nodewords.admin.inc - Edit the attributes of a meta tag.
File
- ./
nodewords.admin.inc, line 272 - Administration forms.
Code
function nodewords_edit_attributes_validate_save($form, &$form_state) {
$form_values = $form_state['values'];
//TODO: check if values of attributes can be empty in W3C standards - prolly yes
foreach ((array) $form_values['attributes'] as $attribute) {
if (empty($attribute['name']) && !($attribute['delete'] || empty($attribute['value']))) {
form_set_error('', t('The name of an attribute can not be empty.'));
}
}
}