Bugfix: template validation was opposite #142

This commit is contained in:
Robert McRackan 2021-10-28 14:38:01 -04:00
parent 288ed75b5d
commit 2478c61df6
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<Version>6.3.1.1</Version> <Version>6.3.2.1</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -141,17 +141,17 @@ namespace LibationWinForms.Dialogs
return; return;
} }
if (Templates.Folder.IsValid(folderTemplateTb.Text)) if (!Templates.Folder.IsValid(folderTemplateTb.Text))
{ {
MessageBox.Show($"Not saving change to folder naming template. Invalid format.", "Invalid folder template", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show($"Not saving change to folder naming template. Invalid format.", "Invalid folder template", MessageBoxButtons.OK, MessageBoxIcon.Error);
return; return;
} }
if (Templates.File.IsValid(fileTemplateTb.Text)) if (!Templates.File.IsValid(fileTemplateTb.Text))
{ {
MessageBox.Show($"Not saving change to file naming template. Invalid format.", "Invalid file template", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show($"Not saving change to file naming template. Invalid format.", "Invalid file template", MessageBoxButtons.OK, MessageBoxIcon.Error);
return; return;
} }
if (Templates.ChapterFile.IsValid(chapterFileTemplateTb.Text)) if (!Templates.ChapterFile.IsValid(chapterFileTemplateTb.Text))
{ {
MessageBox.Show($"Not saving change to chapter file naming template. Invalid format.", "Invalid chapter file template", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show($"Not saving change to chapter file naming template. Invalid format.", "Invalid chapter file template", MessageBoxButtons.OK, MessageBoxIcon.Error);
return; return;