diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs b/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs index f8812fdf7..a4061dc14 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs +++ b/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs @@ -81,6 +81,13 @@ namespace Orchard.Setup.Controllers { ModelState.AddModelError("ConfirmPassword", T("Password confirmation must match").ToString()); } + if(!String.IsNullOrWhiteSpace(model.DatabaseTablePrefix)) { + model.DatabaseTablePrefix = model.DatabaseTablePrefix.Trim(); + if(!Char.IsLetter(model.DatabaseTablePrefix[0])) { + ModelState.AddModelError("DatabaseTablePrefix", T("The table prefix must begin with a letter").Text); + } + } + ValidateMachineKey(); if (!ModelState.IsValid) {