由于提交上来数据是JSON,无法用框架本身的validate()方法,比如:public function store(Request $request){$this->validate($request, ['title' => 'required|unique:posts|max:255','body' => 'required',]); // The blog post is valid, store in database...}