Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
Fix configuration template for phone field
Browse files Browse the repository at this point in the history
  • Loading branch information
rskrzypczak committed Nov 7, 2023
1 parent 777d922 commit 98467cf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions config/ConfigTemplates.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,23 @@
'description' => 'Set the default layout',
'validation' => fn () => isset(\App\Layout::getAllLayouts()[func_get_arg(0)]),
],
'phoneFieldAdvancedVerification' => [
'default' => true,
'description' => 'Enable advanced phone number validation. Enabling it will block saving invalid phone number.',
],
'phoneFieldAdvancedHrefFormat' => [
'default' => new \Nette\PhpGenerator\PhpLiteral('\libphonenumber\PhoneNumberFormat::RFC3966'),
'description' => "Phone number display format. Values:\nfalse - formatting is disabled \n\\libphonenumber\\PhoneNumberFormat::RFC3966 - +48-44-668-18-00\n\\libphonenumber\\PhoneNumberFormat::E164 - +48446681800 \n\\libphonenumber\\PhoneNumberFormat::INTERNATIONAL - 044 668 18 00\n\\libphonenumber\\PhoneNumberFormat::NATIONAL - +48 44 668 18 00",
'validation' => function () {
return \in_array(func_get_arg(0), [
false,
\libphonenumber\PhoneNumberFormat::RFC3966,
\libphonenumber\PhoneNumberFormat::E164,
\libphonenumber\PhoneNumberFormat::INTERNATIONAL,
\libphonenumber\PhoneNumberFormat::NATIONAL,
]);
},
],
'headerAlertMessage' => [
'default' => '',
'description' => 'Header alert message',
Expand Down
4 changes: 2 additions & 2 deletions config/version.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

return [
'appVersion' => '6.5.0',
'patchVersion' => '2023.11.01',
'appVersion' => '6.5.1',
'patchVersion' => '2023.11.07',
'lib_roundcube' => '0.3.1',
];

0 comments on commit 98467cf

Please sign in to comment.