validation method
Implementation
Future<Payload> validation() async {
if (payload.isInvalid()) {
throw PlatformException(
code: 'connection-playload-invalid',
message: 'Please, check our entrypoint container.',
details: null,
);
} else if (hasReportedErrors()) {
throw PlatformException(
code: error.code,
message: error.message,
details: error.details,
);
} else {
return payload;
}
}