Fix PlaceFilter validation

This commit is contained in:
pizzaboxer 2024-10-14 23:49:26 +01:00
parent 9fd48762ae
commit e704a6c270
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
2 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@
d:DataContext="{d:DesignInstance dmodels:MainWindowViewModel, IsDesignTimeCreatable=True}" d:DataContext="{d:DesignInstance dmodels:MainWindowViewModel, IsDesignTimeCreatable=True}"
Title="{x:Static resources:Strings.Menu_Title}" Title="{x:Static resources:Strings.Menu_Title}"
MinWidth="960" MinWidth="960"
Width="980" Width="1000"
Height="580" Height="580"
Background="{ui:ThemeResource ApplicationBackgroundBrush}" Background="{ui:ThemeResource ApplicationBackgroundBrush}"
ExtendsContentIntoTitleBar="True" ExtendsContentIntoTitleBar="True"

View File

@ -27,9 +27,9 @@ namespace Bloxstrap.UI.Elements.Settings.Pages
// values must match the entire string to avoid cases where half the string // values must match the entire string to avoid cases where half the string
// matches but the filter would still be invalid // matches but the filter would still be invalid
private readonly Regex _boolFilterPattern = new("(?:true|false)(;[\\d]{1,})+$"); private readonly Regex _boolFilterPattern = new("^(?:true|false)(;[\\d]{1,})+$", RegexOptions.IgnoreCase);
private readonly Regex _intFilterPattern = new("([\\d]{1,})?(;[\\d]{1,})+$"); private readonly Regex _intFilterPattern = new("^([\\d]{1,})?(;[\\d]{1,})+$", RegexOptions.IgnoreCase);
private readonly Regex _stringFilterPattern = new("^[^;]*(;[\\d]{1,})+$"); private readonly Regex _stringFilterPattern = new("^[^;]*(;[\\d]{1,})+$", RegexOptions.IgnoreCase);
private bool _showPresets = false; private bool _showPresets = false;
private string _searchFilter = ""; private string _searchFilter = "";