public function getRules()
    {
        $rules = [
            static::FIRST_NAME => "required|max:100",
            static::LAST_NAME => "required|max:100",
            static::EMAIL => "required|max:100|email|unique:users,email,{$this->id},id",
        ];
        if (!$this->id) {
            $rules[static::PWD_FIELD] = 'required|min:' . config('app.model.user.password.min', 6)
                . '|max:' . config('app.model.user.password.max', 20);
        }
        return $rules;
    }
public function getRules()
    {
        $rules = [
            static::FIRST_NAME => "required|max:100",
            static::LAST_NAME => "required|max:100",
            static::EMAIL => "required|max:100|email|unique:users,email,{$this->id},id",
        ];
        if (!$this->id) {
            $rules[static::PWD_FIELD] = 'required|min:' . config('app.model.user.password.min', 6)
                . '|max:' . config('app.model.user.password.max', 20);
        }
        return $rules;
    }
public function getRules ( ) { $ rules = [ static :: FIRST_NAME => "required|max:100" , static :: LAST_NAME => "required|max:100" , static :: EMAIL => "required|max:100|email|unique:users,email,{$this->id},id" , ] ; if ( ! $ this -> id ) { $ rules [ static :: PWD_FIELD ] = 'required|min:' . config ( 'app.model.user.password.min' , 6 ) . '|max:' . config ( 'app.model.user.password.max' , 20 ) ; } return $ rules ; }
Return array of rules for model validation

@deprecated Declare rules in Form Request: https://laravel.com/docs/5.5/validation#form-request-validation

@return array
Return array of rules for model validation