mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2026-04-23 12:28:44 -05:00
added validation to some nodes
This commit is contained in:
@@ -7,6 +7,7 @@ namespace FileFlows.BasicNodes.Functions
|
||||
using Jint.Native.Object;
|
||||
using Jint;
|
||||
using System.Text;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
public class Function : Node
|
||||
{
|
||||
@@ -15,9 +16,10 @@ namespace FileFlows.BasicNodes.Functions
|
||||
public override string Icon => "fas fa-code";
|
||||
|
||||
[DefaultValue(1)]
|
||||
[NumberIntAttribute(1)]
|
||||
[NumberInt(1)]
|
||||
public new int Outputs { get; set; }
|
||||
|
||||
[Required]
|
||||
[DefaultValue("// VideoFile object contains info about the video file\n\n// return 0 to complete the flow.\n// return -1 to signal an error in the flow\n// return 1+ to indicate which output to process next\n\n return 0;")]
|
||||
[Code(2)]
|
||||
public string Code { get; set; }
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace FileFlows.BasicNodes.Functions
|
||||
using Jint.Native.Object;
|
||||
using Jint;
|
||||
using System.Text;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
public class Log : Node
|
||||
{
|
||||
@@ -19,6 +20,7 @@ namespace FileFlows.BasicNodes.Functions
|
||||
public LogType LogType { get; set; }
|
||||
|
||||
[TextArea(2)]
|
||||
[Required]
|
||||
public string Message { get; set; }
|
||||
public override int Execute(NodeParameters args)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
namespace FileFlows.BasicNodes.Functions
|
||||
{
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.RegularExpressions;
|
||||
using FileFlows.Plugin;
|
||||
using FileFlows.Plugin.Attributes;
|
||||
@@ -13,6 +14,7 @@ namespace FileFlows.BasicNodes.Functions
|
||||
|
||||
[DefaultValue("")]
|
||||
[Text(1)]
|
||||
[Required]
|
||||
public string Pattern { get; set; }
|
||||
|
||||
public override int Execute(NodeParameters args)
|
||||
|
||||
Reference in New Issue
Block a user