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

Improve validation a little #190

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

merumelu
Copy link
Contributor

@merumelu merumelu commented Aug 30, 2019

Most required fields are now reported together when missing instead of only the first one.

Still not ideal but at least better than before ¯\_(ツ)_/¯

Required fields are now reported together when missing
instead of only the first one.
@@ -155,18 +155,26 @@ public function errorResponseIfNotOwnerOrLevel($currentStatus, &$response, $user
return false;
}

public function errorResponseIfMissingOrNotString($currentStatus, &$response, $object, $property)
public function errorResponseIfMissingOrNotString($currentStatus, &$response, $object, array $properties)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is array needed here? We don't have types in other places..

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe use varags?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants