PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 3.6.50
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v3.6.50
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
fluentform / app / Services / FormBuilder / ValidationRuleSettings.php

ValidationRuleSettings.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 3.6.50, at app/Services/FormBuilder/ValidationRuleSettings.php

211 lines 6.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * validation_rule_settings
5 *
6 * Returns an array of countries and codes.
7 *
8 * @author WooThemes
9 * @category i18n
10 * @package fluentform/i18n
11 * @version 2.5.0
12 */
13
14 if (!defined('ABSPATH')) {
15 exit;
16 }
17
18 $fileTypeOptions = array(
19 array(
20 'label' => __('Images (jpg, jpeg, gif, png, bmp)', 'fluentform'),
21 'value' => 'jpg|jpeg|gif|png|bmp',
22 ),
23 array(
24 'label' => __('Audio (mp3, wav, ogg, oga, wma, mka, m4a, ra, mid, midi)', 'fluentform'),
25 'value' => 'mp3|wav|ogg|oga|wma|mka|m4a|ra|mid|midi|mpga',
26 ),
27 array(
28 'label' => __('Video (avi, divx, flv, mov, ogv, mkv, mp4, m4v, divx, mpg, mpeg, mpe)', 'fluentform'),
29 'value' => 'avi|divx|flv|mov|ogv|mkv|mp4|m4v|divx|mpg|mpeg|mpe|video/quicktime|qt',
30 ),
31 array(
32 'label' => __('PDF (pdf)', 'fluentform'),
33 'value' => 'pdf',
34 ),
35 array(
36 'label' => __('Docs (doc, ppt, pps, xls, mdb, docx, xlsx, pptx, odt, odp, ods, odg, odc, odb, odf, rtf, txt)', 'fluentform'),
37 'value' => 'doc|ppt|pps|xls|mdb|docx|xlsx|pptx|odt|odp|ods|odg|odc|odb|odf|rtf|txt',
38 ),
39 array(
40 'label' => __('Zip Archives (zip, gz, gzip, rar, 7z)', 'fluentform'),
41 'value' => 'zip|gz|gzip|rar|7z',
42 ),
43 array(
44 'label' => __('Executable Files (exe)', 'fluentform'),
45 'value' => 'exe',
46 ),
47 array(
48 'label' => __('CSV (csv)', 'fluentform'),
49 'value' => 'csv',
50 ),
51 );
52
53 $fileTypeOptions = apply_filters('fluentform_file_type_options', $fileTypeOptions);
54
55 $validation_rule_settings = array(
56 'required' =>
57 array(
58 'template' => 'inputRadio',
59 'label' => __('Required', 'fluentform'),
60 'help_text' => __('Select whether this field is a required field for the form or not.', 'fluentform'),
61 'options' =>
62 array(
63 array(
64 'value' => true,
65 'label' => __('Yes', 'fluentform'),
66 ),
67 array(
68 'value' => false,
69 'label' => __('No', 'fluentform'),
70 ),
71 ),
72 ),
73 'min' =>
74 array(
75 'template' => 'inputText',
76 'type' => 'number',
77 'label' => __('Min Value', 'fluentform'),
78 'help_text' => __('Minimum value for the input field.', 'fluentform'),
79 ),
80 'max' =>
81 array(
82 'template' => 'inputText',
83 'type' => 'number',
84 'label' => __('Max Value', 'fluentform'),
85 'help_text' => __('Maximum value for the input field.', 'fluentform'),
86 ),
87 'max_file_size' =>
88 array(
89 'template' => 'maxFileSize',
90 'label' => __('Max File Size', 'fluentform'),
91 'help_text' => __('The file size limit uploaded by the user.', 'fluentform'),
92 ),
93 'max_file_count' =>
94 array(
95 'template' => 'inputText',
96 'type' => 'number',
97 'label' => __('Max Files Count', 'fluentform'),
98 'help_text' => __('Maximum user file upload number.', 'fluentform'),
99 ),
100 'allowed_file_types' =>
101 array(
102 'template' => 'inputCheckbox',
103 'label' => __('Allowed Files', 'fluentform'),
104 'help_text' => __('Allowed Files', 'fluentform'),
105 'fileTypes' => array(
106 array(
107 'title' => __('Images', 'fluentform'),
108 'types' => array('jpg', 'jpeg', 'gif', 'png', 'bmp'),
109 ),
110 array(
111 'title' => __('Audio', 'fluentform'),
112 'types' => array('mp3', 'wav', 'ogg', 'oga', 'wma', 'mka', 'm4a', 'ra', 'mid', 'midi'),
113 ),
114 array(
115 'title' => __('Video', 'fluentform'),
116 'types' => array(
117 'avi',
118 'divx',
119 'flv',
120 'mov',
121 'ogv',
122 'mkv',
123 'mp4',
124 'm4v',
125 'divx',
126 'mpg',
127 'mpeg',
128 'mpe',
129 ),
130 ),
131 array(
132 'title' => __('PDF', 'fluentform'),
133 'types' => array('pdf'),
134 ),
135 array(
136 'title' => __('Docs', 'fluentform'),
137 'types' => array(
138 'doc',
139 'ppt',
140 'pps',
141 'xls',
142 'mdb',
143 'docx',
144 'xlsx',
145 'pptx',
146 'odt',
147 'odp',
148 'ods',
149 'odg',
150 'odc',
151 'odb',
152 'odf',
153 'rtf',
154 'txt'
155 ),
156 ),
157 array(
158 'title' => __('Zip Archives', 'fluentform'),
159 'types' => array('zip', 'gz', 'gzip', 'rar', '7z',),
160 ),
161 array(
162 'title' => __('Executable Files', 'fluentform'),
163 'types' =>
164 array('exe'),
165 ),
166 array(
167 'title' => __('CSV', 'fluentform'),
168 'types' => array('csv'),
169 ),
170 ),
171 'options' => $fileTypeOptions,
172 ),
173 'allowed_image_types' =>
174 array(
175 'template' => 'inputCheckbox',
176 'label' => __('Allowed Images', 'fluentform'),
177 'help_text' => __('Allowed Images', 'fluentform'),
178 'fileTypes' =>
179 array(
180 array(
181 'title' => __('JPG', 'fluentform'),
182 'types' => array('jpg|jpeg',),
183 ),
184 array(
185 'title' => __('PNG', 'fluentform'),
186 'types' => array('png'),
187 ),
188 array(
189 'title' => __('GIF', 'fluentform'),
190 'types' => array('gif'),
191 ),
192 ),
193 'options' => array(
194 array(
195 'label' => __('JPG', 'fluentform'),
196 'value' => 'jpg|jpeg',
197 ),
198 array(
199 'label' => __('PNG', 'fluentform'),
200 'value' => 'png',
201 ),
202 array(
203 'label' => __('GIF', 'fluentform'),
204 'value' => 'gif',
205 ),
206 ),
207 )
208 );
209
210 return apply_filters('fluent_editor_validation_rule_settings', $validation_rule_settings);
211