1 |
76bdcd04
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Module file for webform_validation_testing.
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
65389548
|
Assos Assos
|
include_once 'webform_validation_testing.features.inc';
|
9 |
|
|
|
10 |
76bdcd04
|
Assos Assos
|
/**
|
11 |
|
|
* Implements hook_webform_validation_validators().
|
12 |
|
|
*/
|
13 |
|
|
function webform_validation_testing_webform_validation_validators() {
|
14 |
|
|
$validators = array(
|
15 |
|
|
'webform_validation_testing_1' => array(
|
16 |
|
|
'name' => t('Webform Validation Testing 1'),
|
17 |
|
|
'component_types' => array(
|
18 |
|
|
'all',
|
19 |
|
|
),
|
20 |
|
|
'custom_data' => array(
|
21 |
|
|
'label' => t('Custom data: Should be textarea'),
|
22 |
|
|
'type' => 'textarea',
|
23 |
|
|
'description' => t('Test textarea.'),
|
24 |
|
|
'required' => FALSE,
|
25 |
|
|
),
|
26 |
|
|
'description' => t('Used for testing.'),
|
27 |
|
|
),
|
28 |
|
|
);
|
29 |
|
|
return $validators;
|
30 |
|
|
}
|
31 |
|
|
|
32 |
|
|
/**
|
33 |
|
|
* Implements hook_webform_validation_validate().
|
34 |
|
|
*/
|
35 |
|
|
function webform_validation_testing_webform_validation_validate($validator_name, $items, $components, $rule) {
|
36 |
|
|
switch ($validator_name) {
|
37 |
|
|
case 'webform_validation_testing_1':
|
38 |
|
|
return array();
|
39 |
|
|
}
|
40 |
|
|
} |