ardent icon indicating copy to clipboard operation
ardent copied to clipboard

Match unique rules with no parameters

Open tdhsmith opened this issue 9 years ago • 0 comments

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.

tdhsmith avatar Jun 01 '16 22:06 tdhsmith