Skip to content

Commit

Permalink
Validates ORCID presence
Browse files Browse the repository at this point in the history
  • Loading branch information
betsyecastro committed Mar 3, 2025
1 parent 74eeeda commit 58be9f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/Http/Requests/ProfileUpdateRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function informationRules(): array
'data.*.data.url' => 'nullable|url',
'data.*.data.secondary_url' => 'nullable|url',
'data.*.data.tertiary_url' => 'nullable|url',
'data.*.data.orc_id' => 'nullable|regex:/^[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9X]$/',
'data.*.data.orc_id' => 'nullable|required_if_accepted:data.*.data.orc_id_managed|regex:/^[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9X]$/',
'data.*.data.orc_id_managed' => 'required|boolean',
'data.*.data.fancy_header' => 'required|boolean',
'data.*.data.fancy_header_right' => 'required|boolean',
Expand All @@ -62,7 +62,8 @@ public function messages()
{
return [
'data.*.image.max' => $this->uploadedImageMessages('max'),
'data.*.id.exists' => 'Some of the profile entries you are attempting to update might have been modified since you loaded this page. Please reload this page and try again.'
'data.*.id.exists' => 'Some of the profile entries you are attempting to update might have been modified since you loaded this page. Please reload this page and try again.',
'data.*.data.orc_id.required_if_accepted' => 'The ORCID field is required when Auto-update Publications is enabled.',
];
}

Expand Down

0 comments on commit 58be9f3

Please sign in to comment.