How to set additional data in custom Validation?


I have created custom Validation class and method for validate data on remote services.
This work fine, but in validation method I must create get requests with some query params based on user selections other fields in form.

example, I validate email field, and must in that validation process to use data from other fields “type”.

    // remoteservice?
        ->provider('remoteservice', '\RemoteService\Model\Validation\RemoteValidation')
        ->add('email', 'check', [
            'rule' => 'check',
            'message' => __('The email is not valid'),
            'provider' => 'remoteservice'

How to set two or more fields data to one validation method?

public static function check($email)
// how to access $type here?


OK, my fail.

public static function check($emai, $context)
//now  use $context here