app/Http/Requests/UploadMobile.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 [
            'brand' => 'required|max:20|alpha_num',
            'type' => 'required|max:20|regex:/^[a-zA-Z0-9\s]+$/',
            'color' => 'required|max:20|alpha',
            'weight' => 'required|max:300|numeric',
            'screen_size' => 'required|max:8|numeric'
        ];
    }
public function rules ( ) { return [ 'brand' => 'required|max:20|alpha_num' , 'type' => 'required|max:20|regex:/^[a-zA-Z0-9\s]+$/' , 'color' => 'required|max:20|alpha' , 'weight' => 'required|max:300|numeric' , 'screen_size' => 'required|max:8|numeric' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .