for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace JobApis\JobsToMail\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CreateUser extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
return true;
}
* Get custom messages for validator errors.
* @return array
public function messages()
return [
'regex' =>'The location should be formatted "City, ST". Currently only works for US locations.'
];
* Get the validation rules that apply to the request.
public function rules()
'email' => 'required|email',
'keyword' => 'required',
'location' => 'required|regex:/([^,]+),\s*(\w{2})/',