app/Http/Requests/EnterpriseRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'category_id' => 'required',
            'name' => 'required',
            'contact' => 'required',
            'email' => 'required|email',
            'site' => 'required',
            'telephone' => 'required',
            'address' => 'required',
            'neighborhood' => 'required',
            'city' => 'required',
            'state' => 'required',
            'cpf' => 'required_without:cnpj',
            'cnpj' => 'required_without:cpf'            
        ];
    }
public function rules ( ) { return [ 'category_id' => 'required' , 'name' => 'required' , 'contact' => 'required' , 'email' => 'required|email' , 'site' => 'required' , 'telephone' => 'required' , 'address' => 'required' , 'neighborhood' => 'required' , 'city' => 'required' , 'state' => 'required' , 'cpf' => 'required_without:cnpj' , 'cnpj' => 'required_without:cpf' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .