validation method

Future<Payload> validation()

Implementation

Future<Payload> validation() async {
  if (hasReportedErrors()) {
    throw PlatformException(
      code: error.code,
      message: error.message,
      details: error.details,
    );
  } else {
    return payload;
  }
}