| Conditions | 1 |
| Paths | 1 |
| Total Lines | 36 |
| Code Lines | 28 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public static function defaultConfigForFields($table) |
||
| 12 | { |
||
| 13 | return [ |
||
| 14 | 'isPassword' => [ |
||
| 15 | 'type' => 'password', |
||
| 16 | 'validation' => 'min:5|max:32|required', |
||
| 17 | 'help' => cbTrans("text_default_help_password"), |
||
| 18 | ], |
||
| 19 | 'isImage' => [ |
||
| 20 | 'type' => 'upload', |
||
| 21 | 'validation' => 'required|image', |
||
| 22 | 'help' => cbTrans('text_default_help_upload'), |
||
| 23 | ], |
||
| 24 | 'isGeographical' => [ |
||
| 25 | 'type' => 'hidden', |
||
| 26 | 'validation' => 'required|numeric', |
||
| 27 | ], |
||
| 28 | 'isPhone' => [ |
||
| 29 | 'type' => 'number', |
||
| 30 | 'validation' => 'required|numeric', |
||
| 31 | 'placeholder' => cbTrans('text_default_help_number'), |
||
| 32 | ], |
||
| 33 | 'isEmail' => [ |
||
| 34 | 'type' => 'email', |
||
| 35 | 'validation' => 'require|email|unique:'.$table, |
||
| 36 | 'placeholder' => cbTrans('text_default_help_email'), |
||
| 37 | ], |
||
| 38 | 'isNameField' => [ |
||
| 39 | 'type' => 'text', |
||
| 40 | 'validation' => 'required|string|min:3|max:70', |
||
| 41 | 'placeholder' => cbTrans('text_default_help_text'), |
||
| 42 | ], |
||
| 43 | 'isUrlField' => [ |
||
| 44 | 'type' => 'text', |
||
| 45 | 'validation' => 'required|url', |
||
| 46 | 'placeholder' => cbTrans('text_default_help_url'), |
||
| 47 | ], |
||
| 50 | } |