src/Koldy/Validator.php
protected function validatePresent($value, string $parameter, array $args = [], ?array $rules, array $context): ?string
    {
        if (!array_key_exists($parameter, $context)) {
            return Message::getMessage(Message::PRESENT, [
                'param' => $parameter
            ]);
        }

        return null;
    }
protected function validatePresent($value, string $parameter, array $args = [], ?array $rules, array $context): ?string
    {
        if (!array_key_exists($parameter, $context)) {
            return Message::getMessage(Message::PRESENT, [
                'param' => $parameter
            ]);
        }

        return null;
    }
protected function validatePresent ( $ value , string $ parameter , array $ args = [ ] , ? array $ rules , array $ context ) : ? string { if ( ! array_key_exists ( $ parameter , $ context ) ) { return Message :: getMessage ( Message :: PRESENT , [ 'param' => $ parameter ] ) ; } return null ; }
Validate if parameter is present in array data. It will fail if parameter name does not exists
within data being validated.

@param mixed $value
@param string $parameter
@param array $args
@param array $rules other rule
@param array $context

@return string|null
@throws ValidatorConfigException
@example 'param' => 'present' - will fail if 'param' is not within validation data
Validate if parameter is present in array data . It will fail if parameter name does not exists within data being validated .