src/Handler.php
public function addRule($name, $options = null, $errorMessageTemplate = null, $label = null)
    {
        $predefinedRules = array(
            static::RULE_EXTENSION,
            static::RULE_IMAGE,
            static::RULE_SIZE,
            static::RULE_IMAGE_WIDTH,
            static::RULE_IMAGE_HEIGHT,
            static::RULE_IMAGE_RATIO
        );
        // convert to a name that is known by the default RuleFactory
        if (in_array($name, $predefinedRules)) {
            $name = 'upload' . $name;
        }
        $this->validator->add($name, $options, $errorMessageTemplate, $label);

        return $this;
    }
public function addRule($name, $options = null, $errorMessageTemplate = null, $label = null)
    {
        $predefinedRules = array(
            static::RULE_EXTENSION,
            static::RULE_IMAGE,
            static::RULE_SIZE,
            static::RULE_IMAGE_WIDTH,
            static::RULE_IMAGE_HEIGHT,
            static::RULE_IMAGE_RATIO
        );
        // convert to a name that is known by the default RuleFactory
        if (in_array($name, $predefinedRules)) {
            $name = 'upload' . $name;
        }
        $this->validator->add($name, $options, $errorMessageTemplate, $label);

        return $this;
    }
Add validation rule (extension|size|width|height|ratio)

@param  string                 $name
@param  mixed                  $options
@param  string                 $errorMessageTemplate
@param  string                 $label
@return \Sirius\Upload\Handler