mirror of
https://github.com/Radarr/Radarr.git
synced 2024-10-05 15:47:20 +02:00
Fixed: Partial Revert CF Validation for more robust solution
Fixes #7319
This commit is contained in:
parent
5facab0744
commit
a9627771e6
@ -38,17 +38,6 @@ public CustomFormatController(ICustomFormatService formatService,
|
|||||||
{
|
{
|
||||||
context.AddFailure("Condition name(s) cannot be empty or consist of only spaces");
|
context.AddFailure("Condition name(s) cannot be empty or consist of only spaces");
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var specification in customFormat.Specifications)
|
|
||||||
{
|
|
||||||
foreach (var field in specification.Fields.Where(f => (FieldType)Enum.Parse(typeof(FieldType), f.Type, true) == FieldType.Textbox))
|
|
||||||
{
|
|
||||||
if (specification.Name.IsNotNullOrWhiteSpace() && ((string)field.Value).IsNullOrWhiteSpace())
|
|
||||||
{
|
|
||||||
context.AddFailure(string.Format("'{0}' of condition '{1}' cannot be empty or consist of only spaces", field.Label, specification.Name));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user