Skip to content

Commit

Permalink
ENH Use symfony/validation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Sep 24, 2024
1 parent 4a00dd8 commit 6859e97
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Models/ExternalLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function getCMSFields(): FieldList
{
$this->beforeUpdateCMSFields(function (FieldList $fields) {
$field = UrlField::create('ExternalUrl', _t(__CLASS__ . '.EXTERNAL_URL_FIELD', 'External URL'));
$field->setAllowedProtocols(['http', 'https']);
$field->setDescription(_t(
__CLASS__ . '.EXTERNAL_URL_FIELD_DESCRIPTION',
'The URL must start with either http:// or https://'
Expand Down

0 comments on commit 6859e97

Please sign in to comment.