mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Fix validateNodeProperty if no validator provided
This commit is contained in:
		| @@ -182,6 +182,17 @@ RED.editor = (function() { | ||||
|                     error: err.message | ||||
|                 }); | ||||
|             } | ||||
|         } else if (valid) { | ||||
|             // If the validator is not provided in node property => Check if the input has a validator | ||||
|             if ("category" in node._def) { | ||||
|                 const isConfig = node._def.category === "config"; | ||||
|                 const prefix = isConfig ? "node-config-input" : "node-input"; | ||||
|                 const input = $("#"+prefix+"-"+property); | ||||
|                 const isTypedInput = input.length > 0 && input.next(".red-ui-typedInput-container").length > 0; | ||||
|                 if (isTypedInput) { | ||||
|                     valid = input.typedInput("validate"); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         if (valid && definition[property].type && RED.nodes.getType(definition[property].type) && !("validate" in definition[property])) { | ||||
|             if (!value || value == "_ADD_") { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user