fix: blazor form验证
This commit is contained in:
@@ -150,7 +150,7 @@ public abstract partial class DevicePage : IDisposable
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = ((device.PluginPropertyModel.ValidateForm?.Validate() != false) || (device.PluginPropertyModel.ValidateForm.ValueChangedFields.Count == 0));
|
||||
var result = device.PluginPropertyModel.ValidateForm?.Validate() != false;
|
||||
if (result == false)
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -103,7 +103,7 @@ public partial class VariablePage : IDisposable
|
||||
variable.VariablePropertyModels ??= new();
|
||||
foreach (var item in variable.VariablePropertyModels)
|
||||
{
|
||||
var result = ((item.Value.ValidateForm?.Validate() != false) || (item.Value.ValidateForm.ValueChangedFields.Count == 0));
|
||||
var result = item.Value.ValidateForm?.Validate() != false;
|
||||
if (result == false)
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user