function commerce_stock_admin_form_validate in Commerce Stock 7
Form validator. If they are deleting and have not checked the confirmation checkbox, make them do so.
File
- includes/
commerce_stock.admin.inc, line 92 - Administrative callbacks and form builder functions for Commerce Stock.
Code
function commerce_stock_admin_form_validate($form, &$form_state) {
if (!empty($form_state['commerce_stock']['delete_instances']) && empty($form_state['values']['confirmation'])) {
form_set_error('confirmation', t('Please check the "I understand" checkbox to indicate you understand that all stock data in these fields will be deleted: %fields.', array(
'%fields' => implode(', ', $form_state['commerce_stock']['delete_instances']),
)));
}
}