You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Invalid type for Parse.Cloud validator key ${key}. Expected ${types.join(
63
+
'|'
64
+
)}, actual ${type}`
65
+
);
66
+
}
67
+
};
68
+
for(constkeyinvalidator){
69
+
checkKey(key,allowedKeys,validator[key]);
70
+
if(key==='fields'||key==='requireUserKeys'){
71
+
constvalues=validator[key];
72
+
if(Array.isArray(values)){
73
+
continue;
74
+
}
75
+
for(constvalueinvalues){
76
+
constdata=values[value];
77
+
for(constsubKeyindata){
78
+
checkKey(subKey,fieldOptions,data[subKey]);
79
+
}
80
+
}
81
+
}
82
+
}
83
+
}
16
84
/** @namespace
17
85
* @name Parse
18
86
* @description The Parse SDK.
@@ -50,6 +118,7 @@ var ParseCloud = {};
50
118
* @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.FunctionRequest}, or a {@link Parse.Cloud.ValidatorObject}.
* @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.FileTriggerRequest}, or a {@link Parse.Cloud.ValidatorObject}.
@@ -428,6 +504,7 @@ ParseCloud.beforeSaveFile = function (handler, validationHandler) {
428
504
* @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.FileTriggerRequest}, or a {@link Parse.Cloud.ValidatorObject}.
@@ -459,6 +536,7 @@ ParseCloud.afterSaveFile = function (handler, validationHandler) {
459
536
* @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.FileTriggerRequest}, or a {@link Parse.Cloud.ValidatorObject}.
@@ -490,6 +568,7 @@ ParseCloud.beforeDeleteFile = function (handler, validationHandler) {
490
568
* @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.FileTriggerRequest}, or a {@link Parse.Cloud.ValidatorObject}.
@@ -521,6 +600,7 @@ ParseCloud.afterDeleteFile = function (handler, validationHandler) {
521
600
* @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.ConnectTriggerRequest}, or a {@link Parse.Cloud.ValidatorObject}.
@@ -585,6 +665,7 @@ ParseCloud.sendEmail = function (data) {
585
665
* @param {(Object|Function)} validator An optional function to help validating cloud code. This function can be an async function and should take one parameter a {@link Parse.Cloud.TriggerRequest}, or a {@link Parse.Cloud.ValidatorObject}.
0 commit comments