src/User/Factory.php
protected function validate(array $data)
    {
        $validator = $this->validator->make(
            $data,
            [
                'username' => 'min:6|max:60',
                'password' => 'min:6|max:255',
                'email' => 'email|max:100'
            ]
        );

        if ($validator->fails()) {
            $message = sprintf(
                'Invalid user credentials. %s',
                implode(' ', $validator->errors()->all())
            );
            throw new UserException($message);
        }
    }
protected function validate(array $data)
    {
        $validator = $this->validator->make(
            $data,
            [
                'username' => 'min:6|max:60',
                'password' => 'min:6|max:255',
                'email' => 'email|max:100'
            ]
        );

        if ($validator->fails()) {
            $message = sprintf(
                'Invalid user credentials. %s',
                implode(' ', $validator->errors()->all())
            );
            throw new UserException($message);
        }
    }
protected function validate ( array $ data ) { $ validator = $ this -> validator -> make ( $ data , [ 'username' => 'min:6|max:60' , 'password' => 'min:6|max:255' , 'email' => 'email|max:100' ] ) ; if ( $ validator -> fails ( ) ) { $ message = sprintf ( 'Invalid user credentials. %s' , implode ( ' ' , $ validator -> errors ( ) -> all ( ) ) ) ; throw new UserException ( $ message ) ; } }
Validate user credentials.

@param array $data

@throws UserException
Validate user credentials .