app/Http/Requests/ContactUsRequest.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()
    {
        $rules = [
                'name' => [
                    'required',
                    'string',
                    'min:3',
                    'max:256'
                          ],
                'email' => 'required|email',
                'number' => 'required|integer',
                'subject' => 'required|string',
                'department' => [
                    'nullable',
                    'string',
                     Rule::in(['technical','selling','help',]),
                                ],
                'textarea' => [
                    'string',
                    'min:10',
                    'max:1000'
                              ],
        ];
    }
public function rules ( ) { $ rules = [ 'name' => [ 'required' , 'string' , 'min:3' , 'max:256' ] , 'email' => 'required|email' , 'number' => 'required|integer' , 'subject' => 'required|string' , 'department' => [ 'nullable' , 'string' , Rule :: in ( [ 'technical' , 'selling' , 'help' , ] ) , ] , 'textarea' => [ 'string' , 'min:10' , 'max:1000' ] , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .