Change validation logic
·
33 commits
to master
since this release
Refactoring package com.icerockdev.api.Request
Migration guide:
- Replace
request.isValid()andrequest.isValidRecursive()torequest.validate()andrequest.validRecursive(), respectively. - For get list of error need call
request.getErrorList().
Example:
post("/object") {
val request = call.receiveRequest<TestRequest>()
if (!request.validate()) {
throw ValidationException(request.getErrorList())
}
call.respond(TestResponse2(200, request.email, request.password))
}