Commit 6e6a56d0 authored by Tristan Cavelier's avatar Tristan Cavelier

command validate method allow id with spaces -> fixed

parent be41c3be
......@@ -157,6 +157,16 @@ var command = function (spec, my) {
* @param {object} storage The storage.
*/
that.validate = function (storage) {
if (typeof priv.doc._id === "string" && priv.doc._id.match(" ")) {
that.error({
"status": 21,
"statusText": "Invalid Document Id",
"error": "invalid_document_id",
"message": "The document id is invalid",
"reason": "The document id contains spaces"
});
return false;
}
if (!that.validateState()) {
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