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

Editing a Member in a Group context uses different validator than direct edit #727

Open
sb-relaxt-at opened this issue Apr 25, 2017 · 2 comments

Comments

@sb-relaxt-at
Copy link

When one edits a Member by first selecting a Group and then one of its Members, there is the Member_Validator (as defined in the injector) used (see Group#getCMSFields()). None of the possible MemberExtensions that implement updateValidator (see Member#getValidator()) are considered. Therefore the validation when editing a Member is inconsistent.

@dhensby
Copy link
Contributor

dhensby commented Nov 27, 2017

@sb-relaxt-at care to PR?

@tractorcow
Copy link
Contributor

Suggestion: Remove the setValidator in the Group::getCMSFields, and add an alias in Member from getValidator() to getCMSValidator(), which would cause the validator to be picked up on a per-record basis in the GridfieldDetailForm.

Alternatively, Update GridFieldDetailForm to check both getCMSValidator() and getValidator() on the record.

@sminnee sminnee changed the title Editing a Member in a Group context uses different validator than direct edit [ADMIN] Editing a Member in a Group context uses different validator than direct edit Oct 6, 2018
@sminnee sminnee transferred this issue from silverstripe/silverstripe-framework Nov 3, 2018
@sminnee sminnee changed the title [ADMIN] Editing a Member in a Group context uses different validator than direct edit Editing a Member in a Group context uses different validator than direct edit Nov 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants