Commit 9e5c6ae6 authored by Tristan Cavelier's avatar Tristan Cavelier

jio.js updated

parent 2ae42bb4
...@@ -531,14 +531,13 @@ var command = function (spec, my) { ...@@ -531,14 +531,13 @@ var command = function (spec, my) {
* @param {object} storage The storage. * @param {object} storage The storage.
*/ */
that.validate = function (storage) { that.validate = function (storage) {
if (typeof priv.doc._id === "string" && if (typeof priv.doc._id === "string" && priv.doc._id.match(" ")) {
!priv.doc._id.match("^[^\/]+([\/][^\/]+)?$")) {
that.error({ that.error({
status: 21, "status": 21,
statusText: 'Invalid Document Id', "statusText": "Invalid Document Id",
error: 'invalid_document_id', "error": "invalid_document_id",
message: 'The document id must be like "abc" or "abc/def".', "message": "The document id is invalid",
reason: 'The document id is no like "abc" or "abc/def"' "reason": "The document id contains spaces"
}); });
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment