ardent
ardent copied to clipboard
Match unique rules with no parameters
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.