Relax some node validators to allow undefined value

This commit is contained in:
Nick O'Leary
2023-12-06 10:30:49 +00:00
parent b06494c5be
commit eebab4a921
7 changed files with 11 additions and 11 deletions

View File

@@ -56,6 +56,9 @@ RED.validators = {
if (options.allowBlank && v === '') {
return true
}
if (options.allowUndefined && v === undefined) {
return true
}
const result = RED.utils.validateTypedProperty(v, ptype, opt)
if (result === true || opt) {
// Valid, or opt provided - return result as-is