/12-update-settings-request.php Secret
Created
April 28, 2022 14:22
12 - UpdateSettingsRequest
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
<?php | |
class UpdateSettingsRequest extends FormRequest | |
{ | |
... | |
public function rules() | |
{ | |
return [ | |
'social_twitter' => 'nullable|url', | |
'social_facebook' => 'nullable|url', | |
'social_instagram' => 'nullable|url', | |
'social_linkedin' => 'nullable|url', | |
'social_reddit' => 'nullable|url', | |
'social_personal' => 'nullable|url', | |
]; | |
} | |
public function messages() | |
{ | |
return [ | |
'social_twitter.url' => 'The Twitter URL is invalid.', | |
'social_facebook.url' => 'The Facebook URL is invalid.', | |
'social_instagram.url' => 'The Instagram URL is invalid.', | |
'social_linkedin.url' => 'The LinkedIn URL is invalid.', | |
'social_reddit.url' => 'The Reddit URL is invalid.', | |
'social_personal.url' => 'The personal website\'s URL is invalid.', | |
]; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment