src/Modules/Validation/Validator.php
protected function checkRule($rule, $value, $rule_extended = null)
    {
        switch ($rule) {
            case 'no_empty':
                return $this->noEmpty($value);
            case 'number':
                return $this->number($value);
            case 'decimal':
                return $this->decimal($value);
            case 'alpha':
                return $this->alpha($value);
            case 'alpha_ext':
                return $this->alphaExt($value);
            case 'email_simple':
                return $this->emailSimple($value);
            case 'email':
                return $this->email($value);
            case 'phone':
                return $this->phone($value);
            case 'url':
                return $this->url($value);
            case 'length':
                return $this->length($value, (integer)$rule_extended);
            case 'min_length':
                return $this->minLength($value, (integer)$rule_extended);
            case 'max_length':
                return $this->maxLength($value, (integer)$rule_extended);
            case 'equal_field':
                return $this->equalField($value, $rule_extended);
            default:
                throw new \InvalidArgumentException('Invalid validation rule');
        }
    }
protected function checkRule($rule, $value, $rule_extended = null)
    {
        switch ($rule) {
            case 'no_empty':
                return $this->noEmpty($value);
            case 'number':
                return $this->number($value);
            case 'decimal':
                return $this->decimal($value);
            case 'alpha':
                return $this->alpha($value);
            case 'alpha_ext':
                return $this->alphaExt($value);
            case 'email_simple':
                return $this->emailSimple($value);
            case 'email':
                return $this->email($value);
            case 'phone':
                return $this->phone($value);
            case 'url':
                return $this->url($value);
            case 'length':
                return $this->length($value, (integer)$rule_extended);
            case 'min_length':
                return $this->minLength($value, (integer)$rule_extended);
            case 'max_length':
                return $this->maxLength($value, (integer)$rule_extended);
            case 'equal_field':
                return $this->equalField($value, $rule_extended);
            default:
                throw new \InvalidArgumentException('Invalid validation rule');
        }
    }
@param string         $rule          Config rule: no_empty|number|decimal|alpha|alpha_ext|email_simple|email|phone|url|length|min_length|max_length|equal_field
@param mixed          $value
@param integer|string $rule_extended

@throws \InvalidArgumentException

@return boolean