PluginProbe ʕ •ᴥ•ʔ
Kirki – Freeform Page Builder, Website Builder & Customizer / 6.1.1
Kirki – Freeform Page Builder, Website Builder & Customizer v6.1.1
6.1.1 6.1.0 6.0.14 6.0.13 6.0.12 6.0.11 6.0.10 6.0.9 6.0.8 6.0.7 6.0.6 6.0.5 6.0.4 6.0.3 6.0.2 6.0.1 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 4.0.19 4.0.20 4.0.21 4.0.22 4.0.23 4.0.24 4.1 4.2.0 5.0.0 5.1.0 5.1.1 5.2.0 5.2.1 5.2.2 5.2.3 6.0.0 trunk 3.0.40 3.0.41 3.0.42 3.0.43 3.0.44 3.0.45 3.1.0 3.1.1 3.1.2
kirki / app / Http / Requests / CollaborationComment / CollaborationCommentStoreRequest.php
kirki / app / Http / Requests / CollaborationComment Last commit date
CollaborationCommentDestroyRequest.php 3 weeks ago CollaborationCommentResolveRequest.php 3 weeks ago CollaborationCommentStoreRequest.php 3 weeks ago
CollaborationCommentStoreRequest.php
51 lines
1 <?php
2
3 namespace Kirki\App\Http\Requests\CollaborationComment;
4
5 use Kirki\App\Constants\CollaborationComment\CommentSegmentTypes;
6 use Kirki\Framework\Http\Request;
7 use Kirki\Framework\Sanitizer;
8
9 class CollaborationCommentStoreRequest extends Request
10 {
11 /**
12 * Validation rules.
13 */
14 public function rules()
15 {
16 return [
17 'comment' => 'required|array|min:1',
18 'comment.*.type' => 'required|string|in:' . CommentSegmentTypes::join(),
19 'comment.*.value' => 'nullable',
20 'post_id' => 'required|integer',
21 'parent_id' => 'nullable|integer',
22 'status' => 'nullable|integer',
23 'meta_data' => 'nullable|array',
24 'meta_data.kirki_element_id' => 'nullable|string|max:191',
25 'meta_data.position' => 'nullable|array',
26 'meta_data.position.x' => 'nullable|number',
27 'meta_data.position.y' => 'nullable|number',
28 'session_id' => 'nullable|string',
29 ];
30 }
31
32 /**
33 * Sanitization filters.
34 */
35 public function filters()
36 {
37 return [
38 'comment' => Sanitizer::ARRAY ,
39 'comment.*.type' => Sanitizer::TEXT,
40 'post_id' => Sanitizer::INT,
41 'parent_id' => Sanitizer::INT,
42 'status' => Sanitizer::INT,
43 'meta_data' => Sanitizer::ARRAY ,
44 'meta_data.kirki_element_id' => Sanitizer::TEXT,
45 'meta_data.position.x' => Sanitizer::DOUBLE,
46 'meta_data.position.y' => Sanitizer::DOUBLE,
47 'session_id' => Sanitizer::TEXT,
48 ];
49 }
50 }
51