validate(ctx, alias = {}) {
this
.alias = alias
let params =
this
._assembleAllParams(ctx)
this
.data = cloneDeep(params)
this
.parsed = cloneDeep(params)
const memberKeys = findMembers(
this
, {
filter:
this
._findMembersFilter.bind(
this
)
})
const errorMsgs = []
for
(let key of memberKeys) {
const result =
this
._check(key, alias)
if
(!result.success) {
errorMsgs.push(result.msg)
}
}
if
(errorMsgs.length != 0) {
throw
new
ParameterException(errorMsgs)
}
ctx.v =
this
return
this
}