{"action":"closed","issue":{"url":"https://api.github.com/repos/zaggino/z-schema/issues/61","labels_url":"https://api.github.com/repos/zaggino/z-schema/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/zaggino/z-schema/issues/61/comments","events_url":"https://api.github.com/repos/zaggino/z-schema/issues/61/events","html_url":"https://github.com/zaggino/z-schema/issues/61","id":46812370,"number":61,"title":"Simultaneous validation behaviour on a global shared instance.","user":{"login":"atrniv","id":1157654,"avatar_url":"https://avatars.githubusercontent.com/u/1157654?v=3","gravatar_id":"","url":"https://api.github.com/users/atrniv","html_url":"https://github.com/atrniv","followers_url":"https://api.github.com/users/atrniv/followers","following_url":"https://api.github.com/users/atrniv/following{/other_user}","gists_url":"https://api.github.com/users/atrniv/gists{/gist_id}","starred_url":"https://api.github.com/users/atrniv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atrniv/subscriptions","organizations_url":"https://api.github.com/users/atrniv/orgs","repos_url":"https://api.github.com/users/atrniv/repos","events_url":"https://api.github.com/users/atrniv/events{/privacy}","received_events_url":"https://api.github.com/users/atrniv/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zaggino/z-schema/labels/not%20a%20bug","name":"not a bug","color":"fbca04"},{"url":"https://api.github.com/repos/zaggino/z-schema/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-10-25T13:46:01Z","updated_at":"2015-04-29T03:17:44Z","closed_at":"2015-04-29T03:17:44Z","body":"It seems that ZSchema 3.0 does not support the possibility to share the validator instance across multiple simultaneous validations. \r\n\r\nIn my use case I have several schema files (100+) which I wish to load and validate once. After that I use the validator instance to validate multiple pieces of data which I receive in request bodies on my express server. I wish to reuse the same validator instance for all incoming requests for performance reasons.\r\n\r\nHowever ZSchema stores all validation errors on `this.lastReport` on the validator object. This makes it impossible to be sure if the errors stored in the report are for the data on the same request.\r\n\r\nI'm currently in the process of upgrading from ZSchema 2.0 to 3.0 and I haven't been able to test out my hypothesis yet. Please correct me if I'm wrong.\r\n\r\n\r\n"}}