original_string: public static function validate($attribute)
      {
          $userClass = Yii::$app->user->identityClass;
          $regex = $userClass::$idRegex;
          $result = preg_match($regex, $attribute);
          return is_int($result) && $result > 0;
      }
code: public static function validate($attribute)
      {
          $userClass = Yii::$app->user->identityClass;
          $regex = $userClass::$idRegex;
          $result = preg_match($regex, $attribute);
          return is_int($result) && $result > 0;
      }
code_tokens: public static function validate ( $ attribute ) { $ userClass = Yii :: $ app -> user -> identityClass ; $ regex = $ userClass :: $ idRegex ; $ result = preg_match ( $ regex , $ attribute ) ; return is_int ( $ result ) && $ result > 0 ; }
docstring: Validate whether the attribute is valid.
  @param mixed $attribute
  @return bool
docstring_tokens: Validate whether the attribute is valid .