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

Create new class for relationships in ValidationModel #46

Open
nohponex opened this issue Sep 27, 2016 · 0 comments
Open

Create new class for relationships in ValidationModel #46

nohponex opened this issue Sep 27, 2016 · 0 comments
Labels
Milestone

Comments

@nohponex
Copy link
Member

ObjectValidator is overkill when defining relationships in ValidationModel.

Although the generalized ObjectValidator might be useful for custom validators like (permissions check) etc

Perhaps we can keep ObjectValidator as $2 argument of ValidationModel and create the new class as helper method that bootstraps a default ObjectValidator based on it's constructor parameters

<?php
class RelationshipsValidator extends ObjectValidator
{
public function __construct(string[] $relationships, string[] $required)
{
   //use parent::__construct
}
}
@nohponex nohponex added this to the Release 3.x milestone Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant