-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add validation: At least 1 idp must be selected #1334
Conversation
14a2665
to
1095c1b
Compare
public function __construct( | ||
public array $fieldNames, | ||
?array $groups = null, | ||
mixed $payload = null, |
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.
Isn't it possible to omit mixed
here? If you use mixed here then I would also expect a test for different types of variables.
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.
I dont think payload is used, I've removed it.
@@ -15,7 +15,9 @@ | |||
{% endfor %} | |||
{% endfor %} | |||
|
|||
{{ form_errors(form) }} | |||
{% for error in form.vars.errors %} |
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.
Is this custom code construct really needed?
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.
@teunfransen @quartje
Should this validation also be added this screen?
@quartje
Teun mentioned that unchecking Select all
is similar to not selecting anything (not sure if I understood that correctly). So it might not cause functional issues? But it might not be good UX.
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.
I've tested this, and it's true
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.
however, not selecting an IdP here, results in an entity in manage with the whitelisting allow all IdP to 'false'
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.
Is this custom code construct really needed?
I think this is the easiest for now. Can change to a different solution if its needed somewhere else.
Prior to this change, when no idp was selected in the Entity IDP selection when publishing an Entity, the form validation would handle, and and error was thrown. This change adds form validation that at least one IDP must be selected. Resolves #1331
1095c1b
to
676d082
Compare
Prior to this change, when no idp was selected in the Entity IDP selection when publishing an Entity, the form validation would handle, and and error was thrown.
This change adds form validation that at least one IDP must be selected.
Resolves #1331