$this -> validate($request,[ 'linkname' => 'required|max:6|min:2','url' => 'required','url' => array('regex:/(http?|ftp?):\/\/(www)\.([^\.\/]+)\.(com|cn)(\/[\w-\.\/\?\%\&\=]*)?/i'), 'order' => 'required|regex:[[0-9]+]', ],[ 'linkname.required' => '链接名称不能为空','linkname.max' => '请输入2-6位的链接名称','linkname.min' => '请输入2-6位的链接名称','url.required' => '链接地址不能为空', 'url.regex' => '链接格式不正确,正确格式为http://www.***.com或者http://www.***.cn', 'order.required' => '排序值不能为空','order.regex' => '排序值请输入数字', ]);