Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Use symfony/validation logic #338

Merged

Conversation

GuySartorelli
Copy link
Member

@@ -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']);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explicitly enforcing these protocols, even if the global config allows more protocols than this. We had decided originally this was explicitly what we wanted this link type to be used for. We can always loosen it later on if we want to.

@GuySartorelli GuySartorelli marked this pull request as ready for review September 24, 2024 22:42
Copy link
Member

@emteknetnz emteknetnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Behat failure

@GuySartorelli
Copy link
Member Author

Oops, I somehow missed a reference to the old PasswordValidator.
Should be fixed by silverstripe/silverstripe-behat-extension#286

Copy link
Member

@emteknetnz emteknetnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still failing after merging behat-extension PR and re-running

@GuySartorelli
Copy link
Member Author

I must have been very distracted when doing that original framework PR lol. This behat failure is caused by a bug I introduced there.
Fixed by silverstripe/silverstripe-framework#11414

@emteknetnz emteknetnz merged commit 0f83e15 into silverstripe:5 Oct 2, 2024
13 checks passed
@emteknetnz emteknetnz deleted the pulls/5/symfony-validation branch October 2, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants