13ad65b4
alex
Правка футера 2
|
1
2
3
4
5
6
7
8
|
<?php
namespace common\models;
use artbox\core\models\Feedback as CoreFeedback;
|
43c887b9
alex
fix 4
|
9
|
class Feedback extends CoreFeedback
|
13ad65b4
alex
Правка футера 2
|
10
11
12
13
14
15
16
17
18
19
20
21
|
{
public $reCaptcha;
public function rules()
{
return [
[
[
'name',
'email',
'phone',
|
851006da
alex
test3
|
22
|
|
13ad65b4
alex
Правка футера 2
|
23
24
25
26
27
28
29
30
|
],
'required',
'on' => self::SCENARIO_DEFAULT,
],
[[
'reCaptcha'
],
\himiklab\yii2\recaptcha\ReCaptchaValidator::className(),
|
7d1f6148
alex
Get block to center
|
31
32
|
// 'secret' => '6LcmYmcUAAAAACVi_73RmSAIjJlw4BCgQpfUsrPs',
'secret' => '6LfWrmkUAAAAAAFJfjMieZs-EHblaqdt4sPZZqVZ',
|
13ad65b4
alex
Правка футера 2
|
33
|
'uncheckedMessage' => 'Please confirm that you are not a bot.',
|
f0981e12
alex
fix 2
|
34
|
|
13ad65b4
alex
Правка футера 2
|
35
36
|
],
[
|
f52fbfd5
alex
Get block to center
|
37
38
39
40
|
['reCaptcha'],
'required'
],
[
|
13ad65b4
alex
Правка футера 2
|
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
[
'name',
'email',
],
'required',
'on' => self::SCENARIO_FEEDBACK,
],
[
[
'phone',
'name',
],
'required',
'on' => self::SCENARIO_CALLBACK,
],
[
['email'],
'email',
],
|
87a06531
alex
add PCRE rule to ...
|
60
61
62
63
|
[
['phone'],
'match',
'pattern' => '/^\+38\(\d{3}\)\d{3}-\d{2}-\d{2}$/',
|
3592ff38
alex
Get block to center
|
64
|
'message' => 'Формат телефона должент соответствовать +38(000)000-00-00'
|
87a06531
alex
add PCRE rule to ...
|
65
|
],
|
13ad65b4
alex
Правка футера 2
|
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
[
[
'name',
'phone',
'email',
],
'string',
'max' => 255,
],
[
[
'message',
],
'string',
],
[
[
'status',
],
'boolean',
],
[
'returnUrl',
'safe',
],
];
}
}
?>
|