Skip to content

Commit 746dd8b

Browse files
committed
Fix Validate command always fails to be executed
ref: CommunityToolkit/dotnet#516
1 parent 852c90f commit 746dd8b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

IPConfig/ViewModels/IPConfigDetailViewModel.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ private void Apply()
399399
}
400400

401401
FormatInput();
402-
Validate(false);
402+
EditingIPConfig.ValidateAllProperties();
403403

404404
string msg = Lang.ApplyAsk_Format.Format(_nic.Name, _nic.Description);
405405

@@ -624,15 +624,10 @@ private void TryAutoCompleteGateway()
624624
}
625625

626626
[RelayCommand]
627-
private void Validate(bool showGrowl = true)
627+
private void Validate()
628628
{
629629
EditingIPConfig.ValidateAllProperties();
630630

631-
if (!showGrowl)
632-
{
633-
return;
634-
}
635-
636631
if (EditingIPConfig.HasErrors)
637632
{
638633
Growl.Error(Lang.ValidationError);

0 commit comments

Comments
 (0)