I’ve documented the Client / Server Validation in the TechStacks project.
errorResponse
is a method from @servicestack/client
:
import { toObject, errorResponse, errorResponseExcept } from "@servicestack/client";
Which is made made available to the Vue template by registering it in its method:
//...
methods: {
errorResponse, // Make the errorResponse method available to the template
}
The errorResponse
returns only the summary ResponseStatus.Message
when there are no field error specified otherwise it returns undefined
. Vuetify only shows the <v-alert/>
dialog when errorResponse
returns a value which it checks the responseStatus
property of the Vue component to determine.
You can see the behavior of the errorResponse
method from its tests in utils.spec.ts.