phpldapadmin/app/Http/Requests/EntryAdd.php
Deon George 6ebf588b1f
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 28s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m30s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 9m28s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
Start of work to enable creation of new entries
2025-02-25 23:47:25 +11:00

33 lines
570 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
use App\Rules\{DNExists,HasStructuralObjectClass};
class EntryAdd extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules(): array
{
return [
'dn' => new DNExists,
'objectclass' => [
'required',
'array',
new HasStructuralObjectClass,
],
'step' => 'int|min:1|max:2',
'frame' => [
'string',
Rule::in(['create']),
]
];
}
}