forked from Hounslow-Connect/api
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
755 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,17 +77,23 @@ public function rules(): array | |
new Slug(), | ||
], | ||
'organisation.name' => ['required_without:organisation.id', 'nullable', 'string', 'min:1', 'max:255'], | ||
'organisation.description' => ['required_without:organisation.id', 'nullable', 'string', 'min:1', 'max:10000'], | ||
'organisation.url' => ['required_without:organisation.id', 'nullable', 'url', 'max:255'], | ||
'organisation.description' => [ | ||
'required_without:organisation.id', | ||
'nullable', | ||
'string', | ||
new MarkdownMinLength(1), | ||
new MarkdownMaxLength(config('local.organisation_description_max_chars'), 'Description tab - The long description must be ' . config('local.organisation_description_max_chars') . ' characters or fewer.'), | ||
], | ||
'organisation.url' => ['sometimes', 'nullable', 'url', 'max:255'], | ||
'organisation.email' => [ | ||
'sometimes', | ||
'nullable', | ||
'required_without_all:organisation.id,organisation.phone', | ||
'email', | ||
'max:255', | ||
], | ||
'organisation.phone' => [ | ||
'sometimes', | ||
'nullable', | ||
'required_without_all:organisation.id,organisation.email', | ||
'string', | ||
'min:1', | ||
'max:255', | ||
|
@@ -121,7 +127,7 @@ public function rules(): array | |
'required', | ||
'string', | ||
new MarkdownMinLength(1), | ||
new MarkdownMaxLength(3000), | ||
new MarkdownMaxLength(config('local.service_description_max_chars'), 'Description tab - The long description must be ' . config('local.service_description_max_chars') . ' characters or fewer.'), | ||
], | ||
'service.wait_time' => ['sometimes', 'present', 'nullable', Rule::in([ | ||
Service::WAIT_TIME_ONE_WEEK, | ||
|
@@ -135,7 +141,7 @@ public function rules(): array | |
'service.fees_url' => ['sometimes', 'present', 'nullable', 'url', 'max:255'], | ||
'service.testimonial' => ['sometimes', 'present', 'nullable', 'string', 'min:1', 'max:255'], | ||
'service.video_embed' => ['sometimes', 'present', 'nullable', 'url', 'max:255', new VideoEmbed()], | ||
'service.url' => ['sometimes', 'required', 'url', 'max:255'], | ||
'service.url' => ['sometimes', 'present', 'nullable', 'url', 'max:255'], | ||
'service.contact_name' => ['sometimes', 'present', 'nullable', 'string', 'min:1', 'max:255'], | ||
'service.contact_phone' => ['sometimes', 'present', 'nullable', 'string', 'min:1', 'max:255'], | ||
'service.contact_email' => ['sometimes', 'present', 'nullable', 'email', 'max:255'], | ||
|
@@ -151,7 +157,7 @@ public function rules(): array | |
'required_with:service.useful_infos.*', | ||
'string', | ||
new MarkdownMinLength(1), | ||
new MarkdownMaxLength(10000), | ||
new MarkdownMaxLength(config('local.useful_info_description_max_chars')), | ||
], | ||
'service.useful_infos.*.order' => [ | ||
'required_with:service.useful_infos.*', | ||
|
@@ -210,18 +216,14 @@ public function messages(): array | |
'organisation.slug.unique' => '3. Organisation - The organisation is already listed. Please contact us for help logging in ' . config('local.global_admin.email') . '.', | ||
'organisation.name.required' => '3. Organisation - Please enter the organisation name.', | ||
'organisation.description.required' => '3. Organisation - Please enter a one-line summary of the organisation.', | ||
'organisation.url.required' => '3. Organisation - Please enter a valid web address in the correct format (starting with https:// or http://).', | ||
'organisation.url.url' => '3. Organisation - Please enter a valid web address in the correct format (starting with https:// or http://).', | ||
'organisation.email.required_without' => '3. Organisation - Please enter a public email address and/or a public phone number.', | ||
'organisation.phone.required_without' => '3. Organisation - Please enter a public phone number and/or public email address.', | ||
'organisation.email.email' => '3. Organisation - Please enter the email for your organisation (eg. [email protected]).', | ||
|
||
'service.slug.required' => "4. Service, Details tab - Please enter the name of your {$type}.", | ||
'service.name.required' => "4. Service, Details tab - Please enter the name of your {$type}.", | ||
'service.video_embed.url' => '4. Service, Additional info tab - Please enter a valid video link (eg. https://www.youtube.com/watch?v=JyHR_qQLsLM).', | ||
'service.intro.required' => "4. Service, Description tab - Please enter a brief description of the {$type}.", | ||
'service.description.required' => "4. Service, Description tab - Please enter all the information someone should know about your {$type}.", | ||
'service.url.required' => "4. Service, Details tab - Please provide the web address for your {$type}.", | ||
'service.url.url' => '4. Service, Details tab - Please enter a valid web address in the correct format (starting with https:// or http://).', | ||
'service.contact_email.email' => "4. Service, Additional Info tab - Please enter an email address users can use to contact your {$type} (eg. [email protected]).", | ||
]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.