function notifyRule(NRule $rule) { if (is_string($rule->operation) && strcasecmp($rule->operation, ':length') === 0 && !$rule->isNegative) { $this->control->maxlength = is_array($rule->arg) ? $rule->arg[1] : $rule->arg; } elseif (is_string($rule->operation) && strcasecmp($rule->operation, ':maxLength') === 0 && !$rule->isNegative) { $this->control->maxlength = $rule->arg; } parent::notifyRule($rule); }