Commit be41c3be authored by Tristan Cavelier's avatar Tristan Cavelier

command validate method does not allow all document ids -> fixed

parent 80e8165a
...@@ -157,17 +157,6 @@ var command = function (spec, my) { ...@@ -157,17 +157,6 @@ 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" &&
!priv.doc._id.match("^[^\/]+([\/][^\/]+)?$")) {
that.error({
status: 21,
statusText: 'Invalid Document Id',
error: 'invalid_document_id',
message: 'The document id must be like "abc" or "abc/def".',
reason: 'The document id is no like "abc" or "abc/def"'
});
return false;
}
if (!that.validateState()) { if (!that.validateState()) {
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