server proposal for validation

This commit is contained in:
Ilya 2017-04-05 19:14:45 +03:00 committed by GitHub
parent 42e16a650b
commit 99400bb12d

View File

@ -152,8 +152,9 @@ export default context => {
if (!isValid) return
if (typeof Component.options.validate !== 'function') return
isValid = Component.options.validate({
params: context.route.params || {},
query: context.route.query || {}
params : context.route.params || {},
query : context.route.query || {},
store : context.store.state || {}
})
})
if (!isValid) {