added validation to some nodes

This commit is contained in:
reven
2021-11-24 17:55:27 +13:00
parent 962fe7959c
commit 599ee1700e
20 changed files with 24 additions and 220 deletions

View File

@@ -1,6 +1,7 @@
namespace FileFlows.BasicNodes.File
{
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using FileFlows.Plugin;
using FileFlows.Plugin.Attributes;
@@ -13,6 +14,7 @@ namespace FileFlows.BasicNodes.File
private string _DestinationPath = string.Empty;
[Required]
[Folder(1)]
public string DestinationPath
{

View File

@@ -1,6 +1,7 @@
namespace FileFlows.BasicNodes.File
{
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using FileFlows.Plugin;
using FileFlows.Plugin.Attributes;
@@ -11,6 +12,7 @@ namespace FileFlows.BasicNodes.File
public override string Icon => "far fa-file-excel";
[StringArray(1)]
[Required]
public string[] Extensions { get; set; }
public override FlowElementType Type => FlowElementType.Logic;

View File

@@ -1,6 +1,7 @@
namespace FileFlows.BasicNodes.File
{
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using FileFlows.Plugin;
using FileFlows.Plugin.Attributes;
@@ -12,6 +13,7 @@ namespace FileFlows.BasicNodes.File
public override FlowElementType Type => FlowElementType.Process;
public override string Icon => "fas fa-file-export";
[Required]
[Folder(1)]
public string DestinationPath { get; set; }

View File

@@ -1,5 +1,6 @@
namespace FileFlows.BasicNodes.File
{
using System.ComponentModel.DataAnnotations;
using System.Text.RegularExpressions;
using FileFlows.Plugin;
using FileFlows.Plugin.Attributes;
@@ -14,6 +15,7 @@
public override FlowElementType Type => FlowElementType.Process;
[Required]
[TextVariable(1)]
public string? Pattern
{