Skip to content

Commit c0e5bd8

Browse files
author
Ivan Gavryshko
committed
MAGETWO-31904: There is no validation for 'Table prefix' on Step 2: Add a Database during instalation
- changed tooltip message (approved) - added comment to validation
1 parent eac0202 commit c0e5bd8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

setup/src/Magento/Setup/Model/Installer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,8 @@ public function checkDatabaseConnection($dbName, $dbHost, $dbUser, $dbPass = '')
766766
*/
767767
public function checkDatabaseTablePrefix($prefix)
768768
{
769+
//The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_);
770+
// the first character should be a letter.
769771
if ($prefix !== '' && !preg_match('/^([a-zA-Z])([[:alnum:]]+)([[:alnum:]_]+)$/', $prefix)) {
770772
throw new \InvalidArgumentException('Please correct the table prefix format.');
771773
}

setup/view/magento/setup/add-database.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
<label class="col-sm-4 control-label">Table prefix</label>
150150
<div class="col-sm-4">
151151
<input tooltip-placement="right"
152-
tooltip="Enter a tracking prefix to be used for database tables created for this Magento installation. (ex: 'mg1_' ). The table prefix should contain only letters (a-z), numbers (0-9) or underscores (_); the first character should be a letter."
152+
tooltip="Enter a prefix for database tables created in this installation. Use letters, numbers or underscores, and begin with a letter (Ex: ‘mg1_’)."
153153
tooltip-trigger="focus"
154154
tooltip-append-to-body="true"
155155
class="form-control"

0 commit comments

Comments
 (0)