tethys/app/Http/Requests/Person/EditPersonRequest.php
Arno Kaimbacher c082b4bc60 - add additional migration files
- add seeder for collections
- coverage x_min, x_max, y_min, y_max
- SitelinkController db-independent
2020-06-10 21:09:22 +02:00

43 lines
1.1 KiB
PHP

<?php
namespace App\Http\Requests\Person;
use App\Http\Requests\Request;
use Illuminate\Validation\Rule;
//https://packagist.org/packages/felixkiss/uniquewith-validator
class EditPersonRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'academic_title' => 'nullable|min:2|max:255',
'last_name' => 'required|min:3|max:255|unique_with:persons,first_name,date_of_birth',
'first_name' => 'required|min:3|max:255',
'email' => 'required|email|max:50|unique:persons,email',
// 'email' => [
// 'required', 'email', 'max:100',
// Rule::unique('persons')->ignore($user->id),
// ],
'identifier_orcid' => 'nullable|min:19|max:50',
'status' => 'required|boolean',
'date_of_birth' => 'nullable|date'
];
}
}