You are here

function webform_validation_prefix_keys in Webform Validation 7

Same name and namespace in other branches
  1. 6 webform_validation.module \webform_validation_prefix_keys()

Prefix numeric array keys to avoid them being reindexed.

Reindexing done in module_invoke_all().

Opposite of webform_validation_unprefix_keys().

1 call to webform_validation_prefix_keys()
webform_validation_validate in ./webform_validation.module
Webform validation handler to validate against the given rules.

File

./webform_validation.module, line 351

Code

function webform_validation_prefix_keys($arr) {
  $ret = array();
  foreach ($arr as $k => $v) {
    $ret['item_' . $k] = $v;
  }
  return $ret;
}