DN updates some array values can be NULL (to delete the value), so validation show allow for that

This commit is contained in:
Deon George 2024-01-20 11:21:08 +11:00
parent 76306b9a1b
commit c1ba6df90d

View File

@ -132,9 +132,45 @@ return [
| |
*/ */
'validation' => [ 'validation' => [
'objectclass' => ['objectclass'=>['array','min:1']], 'objectclass' => [
'gidnumber' => ['gidnumber'=>['sometimes','array','max:1'],'gidnumber.*'=>['integer','max:65535']], 'objectclass'=>[
'mail' => ['mail'=>['sometimes','array','min:1'],'mail.*'=>['nullable','email']], 'array',
'uidnumber' => ['uidnumber'=>['sometimes','array','max:1'],'uidnumber.*'=>['integer','max:65535']], 'min:1'
]
],
'gidnumber' => [
'gidnumber'=> [
'sometimes',
'array',
'max:1'
],
'gidnumber.*' => [
'nullable',
'integer',
'max:65535'
]
],
'mail' => [
'mail'=>[
'sometimes',
'array','min:1'
],
'mail.*' => [
'nullable',
'email'
]
],
'uidnumber' => [
'uidnumber' => [
'sometimes',
'array',
'max:1'
],
'uidnumber.*' => [
'nullable',
'integer',
'max:65535'
]
],
], ],
]; ];