Skip to content

Commit 37b78f2

Browse files
committed
add otherKey
1 parent a60ad68 commit 37b78f2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

spec/CloudCode.Validator.spec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ describe('cloud validator', () => {
12801280
fields: true,
12811281
});
12821282
expect(logger.error).toHaveBeenCalledWith(
1283-
'requiredUser is not a supported paramter for Parse.Cloud validators.'
1283+
'requiredUser is not a supported parameter for Parse.Cloud validators.'
12841284
);
12851285
expect(logger.error).toHaveBeenCalledWith(
12861286
'Invalid type for Parse.Cloud validator key requireUser. Expected boolean, actual array'
@@ -1311,9 +1311,13 @@ describe('cloud validator', () => {
13111311
constant: ['foo'],
13121312
required: ['foo'],
13131313
error: ['foo'],
1314+
otherKey: true,
13141315
},
13151316
},
13161317
});
1318+
expect(logger.error).toHaveBeenCalledWith(
1319+
'otherKey is not a supported parameter for Parse.Cloud validators.'
1320+
);
13171321
expect(logger.error).toHaveBeenCalledWith(
13181322
'Invalid type for Parse.Cloud validator key constant. Expected boolean, actual array'
13191323
);

src/cloud-code/Parse.Cloud.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function validateValidator(validator) {
5252
const checkKey = (key, data, validatorParam) => {
5353
const parameter = data[key];
5454
if (!parameter) {
55-
logger.error(`${key} is not a supported paramter for Parse.Cloud validators.`);
55+
logger.error(`${key} is not a supported parameter for Parse.Cloud validators.`);
5656
return;
5757
}
5858
const types = parameter.map(type => getType(type));

0 commit comments

Comments
 (0)