mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Validating TablePrefix
- http://orchard.codeplex.com/workitem/16488 --HG-- branch : dev
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user