private function validateUsername(Request $request)
    {
        $username = self::$validator->isString('username');

        $result = $username
            ->isRequired()
            ->isAlpha()
            ->isBetween(4, 12, true)
            ->validate($request->username);

        $this->isValid = $this->isValid && $result;
        $this->errors  = array_merge($this->errors, $username->getErrors());
    }
private function validateUsername(Request $request)
    {
        $username = self::$validator->isString('username');

        $result = $username
            ->isRequired()
            ->isAlpha()
            ->isBetween(4, 12, true)
            ->validate($request->username);

        $this->isValid = $this->isValid && $result;
        $this->errors  = array_merge($this->errors, $username->getErrors());
    }
private function validateUsername ( Request $ request ) { $ username = self :: $ validator -> isString ( 'username' ) ; $ result = $ username -> isRequired ( ) -> isAlpha ( ) -> isBetween ( 4 , 12 , true ) -> validate ( $ request -> username ) ; $ this -> isValid = $ this -> isValid && $ result ; $ this -> errors = array_merge ( $ this -> errors , $ username -> getErrors ( ) ) ; }
Validates is a username has alphanumeric values and is between 3 to 12 characters long.

@param Request $request

@return boolean|null
Validates is a username has alphanumeric values and is between 3 to 12 characters long .