-
Notifications
You must be signed in to change notification settings - Fork 15
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
ENH Use symfony/validation logic #338
Conversation
e9f317e
to
6859e97
Compare
@@ -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']); |
There was a problem hiding this comment.
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.
6859e97
to
46c1d0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Behat failure
Oops, I somehow missed a reference to the old |
There was a problem hiding this 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
I must have been very distracted when doing that original framework PR lol. This behat failure is caused by a bug I introduced there. |
Relies on changes in silverstripe/silverstripe-framework#11399
Issue
symfony/validator
for as much validation logic as we can throw at it. .github#193