forked from aslan/applicant-site
prodV1 #2
|
@ -15,11 +15,11 @@ class StoreDepartmentRequest extends FormRequest
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'name' => 'required|string|max:255|unique:departments,name',
|
'name' => 'required|string|max:255|unique:departments,name',
|
||||||
'description' => 'string',
|
'description' => 'string',
|
||||||
'slug' => 'required|string',
|
'slug' => 'required|string|max:255',
|
||||||
'faculty_id' => 'required|int',
|
'faculty_id' => 'required|numeric|int|max:1000',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,13 +14,13 @@ class StoreDirectionRequest extends FormRequest
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'name' => 'required|string|max:255|unique:directions,name',
|
'name' => 'required|string|max:255|unique:directions,name',
|
||||||
'description' => 'string',
|
'description' => 'string',
|
||||||
'slug' => 'required|string',
|
'slug' => 'required|string|max:255',
|
||||||
'code' => 'required|string',
|
'code' => 'required|string|max:255',
|
||||||
'education_level_id' => 'required|int',
|
'education_level_id' => 'required|int|numeric|max:1000',
|
||||||
'department_id' => 'required|int'
|
'department_id' => 'required|numeric|int|max:1000'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ class StoreEducationLevelRequest extends FormRequest
|
||||||
return [
|
return [
|
||||||
'name' => 'required|string|max:255|unique:education_levels,name',
|
'name' => 'required|string|max:255|unique:education_levels,name',
|
||||||
'description' => 'string',
|
'description' => 'string',
|
||||||
'slug' => 'required|string',
|
'slug' => 'required|string|max:255',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,10 +14,10 @@ class StoreEducationalInstitutionRequest extends FormRequest
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'name' => 'required|string|max:255|unique:educational_institutions,name',
|
'name' => 'required|string|max:255|unique:educational_institutions,name',
|
||||||
'description' => 'string',
|
'description' => 'string',
|
||||||
'slug' => 'required|string',
|
'slug' => 'required|string|max:255',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,11 +15,11 @@ class StoreFacultyRequest extends FormRequest
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'name' => 'required|string|max:255|unique:faculties,name',
|
'name' => 'required|string|max:255|unique:faculties,name',
|
||||||
'description' => 'string',
|
'description' => 'string',
|
||||||
'slug' => 'required|string',
|
'slug' => 'required|string|max:255',
|
||||||
'educational_institution_id' => 'required|int'
|
'educational_institution_id' => 'required|int|numeric|max:1000'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,10 +13,10 @@ class UpdateDepartmentRequest extends FormRequest
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'description' => 'string',
|
'description' => 'string',
|
||||||
'slug' => 'string|required',
|
'slug' => 'string|required|max:255',
|
||||||
'faculty_id' => 'int|required',
|
'faculty_id' => 'int|required|numeric|max:255',
|
||||||
'name' => [
|
'name' => [
|
||||||
'required',
|
'required',
|
||||||
'string',
|
'string',
|
||||||
|
|
|
@ -15,12 +15,12 @@ class UpdateDirectionRequest extends FormRequest
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|max:255',
|
'position' => 'required||numeric|int|max:255',
|
||||||
'description' => 'string',
|
'description' => 'string',
|
||||||
'department_id' => 'int|required',
|
'department_id' => 'int|required|numeric|max:1000',
|
||||||
'slug' => 'required|string',
|
'slug' => 'required|string|max:255',
|
||||||
'code' => 'required|string',
|
'code' => 'required|string|max:255',
|
||||||
'education_level_id' => 'required|int',
|
'education_level_id' => 'required|int|numeric|max:1000',
|
||||||
'name' => [
|
'name' => [
|
||||||
'required',
|
'required',
|
||||||
'string',
|
'string',
|
||||||
|
|
|
@ -16,7 +16,7 @@ class UpdateEducationLevelRequest extends FormRequest
|
||||||
return [
|
return [
|
||||||
'name' => "required|string|max:255|unique:education_levels,name,{$this->education_level->id}",
|
'name' => "required|string|max:255|unique:education_levels,name,{$this->education_level->id}",
|
||||||
'description' => 'string',
|
'description' => 'string',
|
||||||
'slug' => 'required|string',
|
'slug' => 'required|string|max:255',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,9 +15,9 @@ class UpdateEducationalInstitutionRequest extends FormRequest
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'description' => 'string',
|
'description' => 'string',
|
||||||
'slug' => 'required|string',
|
'slug' => 'required|string|max:255',
|
||||||
'name' => [
|
'name' => [
|
||||||
'required',
|
'required',
|
||||||
'string',
|
'string',
|
||||||
|
|
|
@ -14,10 +14,10 @@ class UpdateFacultyRequest extends FormRequest
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'description' => 'string',
|
'description' => 'string',
|
||||||
'slug' => 'required|string',
|
'slug' => 'required|string|max:255',
|
||||||
'educational_institution_id' => 'required|int',
|
'educational_institution_id' => 'required|int|numeric|max:255',
|
||||||
'name' => [
|
'name' => [
|
||||||
'required',
|
'required',
|
||||||
'string',
|
'string',
|
||||||
|
|
|
@ -14,10 +14,10 @@ class StoreAdmissionRequest extends FormRequest
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'name' => 'required|string|max:255|unique:admissions,name',
|
'name' => 'required|string|max:255|unique:admissions,name',
|
||||||
'description' => 'string',
|
'description' => 'string',
|
||||||
'slug' => 'required|string',
|
'slug' => 'required|string|max:255',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,11 +15,11 @@ class StoreDocumentRequest extends FormRequest
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => 'required|max:255',
|
'name' => 'required|string|max:255',
|
||||||
'description' => 'string',
|
'description' => 'string',
|
||||||
'position' => 'required|int|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'document' => 'required|file',
|
'document' => 'required|file',
|
||||||
'admission_id' => 'required|int|max:255',
|
'admission_id' => 'required|int|numeric|max:1000',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,26 +6,16 @@ use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
class StoreUserRequest extends FormRequest
|
class StoreUserRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Determine if the user is authorized to make this request.
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function authorize()
|
public function authorize()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the validation rules that apply to the request.
|
|
||||||
*
|
|
||||||
* @return array<string, mixed>
|
|
||||||
*/
|
|
||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => 'required|unique:users,name|max:255',
|
'name' => 'required|unique:users,name|max:255',
|
||||||
'email' => 'email',
|
'email' => 'email|string|max:255',
|
||||||
'password' => 'required'
|
'password' => 'required'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,9 +14,9 @@ class UpdateAdmissionRequest extends FormRequest
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'description' => 'string',
|
'description' => 'string',
|
||||||
'slug' => 'string|required',
|
'slug' => 'string|required|max:255',
|
||||||
'name' => [
|
'name' => [
|
||||||
'required',
|
'required',
|
||||||
'string',
|
'string',
|
||||||
|
|
|
@ -20,9 +20,9 @@ class UpdateDocumentRequest extends FormRequest
|
||||||
'max:255',
|
'max:255',
|
||||||
"unique:documents,name,{$this->document->id}",
|
"unique:documents,name,{$this->document->id}",
|
||||||
],
|
],
|
||||||
'position' => 'required|int|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'description' => 'string',
|
'description' => 'string',
|
||||||
'admission_id' => 'required|int|max:255',
|
'admission_id' => 'required|int|numeric|max:1000',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,9 +24,9 @@ class UpdateUserRequest extends FormRequest
|
||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => 'required|max:255',
|
'name' => 'required|string|max:255',
|
||||||
'email' => 'email',
|
'email' => 'email|string|max:255',
|
||||||
'password' => 'required'
|
'password' => 'required|max:255'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue