Skip to content

Conversation

@vermakhushboo
Copy link
Contributor

There are some scenarios where we need both length and queries validation.

return false;
}

if ($this->length && \count($value) > $this->length) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure we need the first since it is constructed with 0?

Copy link
Member

@abnegate abnegate Nov 28, 2023

Choose a reason for hiding this comment

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

@fogelito It looks like we are using 0 to mean unlimited, so when 0, \count($value) > $this->length won't be checked since 0 == false

@fogelito
Copy link
Contributor

Besides small comment looks ok 👍
@abnegate?

@abnegate abnegate merged commit ebd030f into main Nov 28, 2023
@abnegate abnegate deleted the fix-add-length-to-query-validator branch November 28, 2023 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants