public async Task <ValidationResult> ValidateAsync(RecordVehiclePositionCommand command) { var vehicle = await _vehicleDomainRepository.FindAsync(command.VehicleId); RuleFor(x => x.DigitalSignature).Must(x => _signatureProvider.ValidateSignature(command, vehicle.PublicKey, x) == true).WithMessage(Error.SignatureIsNotValid); return(base.Validate(command)); }