Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Match unique rules with no parameters #298

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

Match unique rules with no parameters #298

wants to merge 1 commit into from

Conversation

tdhsmith
Copy link

@tdhsmith tdhsmith commented Jun 1, 2016

As it stands, the example provided in the README ('email' => 'required|email|unique',) doesn't work because buildUniqueExclusionRules is searching specifically for unique:, ending with a colon.

Presumably this isn't intentional, based on the later count(explode(':', $params[0])) check which currently would be impossible to trigger, so the string match has been adjusted.

That said, is there any concern of matching custom rules starting with 'unique'? The string check could be made more complicated to avoid this, but I personally think of it as a low priority concern.

As it stands, the example provided in the README (`'email' => 'required|email|unique',`) doesn't work because `buildUniqueExclusionRules` is searching specifically for `unique:`, ending with a colon.

Presumably this isn't intentional, based on the later `count(explode(':', $params[0]))` check which currently would be impossible to trigger, so the string match has been adjusted.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants