Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
简单模式Meteor-数组验证_Meteor_Simple Schema - Fatal编程技术网

简单模式Meteor-数组验证

简单模式Meteor-数组验证,meteor,simple-schema,Meteor,Simple Schema,我使用这个包在进入数据库集合之前验证数据。我的集合中的一个字段必须包含字符串数组-我如何验证此字段?到目前为止您尝试了什么?您使用的是什么软件包,您的代码是什么样子的?请提供更多信息,我相信社区会帮助你。到目前为止,你做了哪些尝试?您使用的是什么软件包,您的代码是什么样子的?请提供更多信息,我相信社区会为您提供帮助。 YourCollection.attachSchema(new SimpleSchema({ ... yourArray: {type: [String]}, });

我使用这个包在进入数据库集合之前验证数据。我的集合中的一个字段必须包含字符串数组-我如何验证此字段?

到目前为止您尝试了什么?您使用的是什么软件包,您的代码是什么样子的?请提供更多信息,我相信社区会帮助你。到目前为止,你做了哪些尝试?您使用的是什么软件包,您的代码是什么样子的?请提供更多信息,我相信社区会为您提供帮助。
YourCollection.attachSchema(new SimpleSchema({
  ...
  yourArray: {type: [String]},
});