Skip to content

Injection of unique identifier for all unique-like rules - #153

Closed
Propaganistas wants to merge 1 commit into
dwightwatson:masterfrom
Propaganistas:unique-generic
Closed

Propaganistas wants to merge 1 commit into
dwightwatson:masterfrom
Propaganistas:unique-generic

Conversation

@Propaganistas

Copy link
Copy Markdown
Contributor

I'd expect that any unique-like rule would need some identifier injection, so why not make it more generic in code?

This allows for ease of use in conjunction with for example the unique_with validator.

@dwightwatson

Copy link
Copy Markdown
Owner

Thanks for taking the time to put this together. Unfortunately I don't feel this PR is a good fit at the moment.

The reason the OR clause is in there is because of #114. I'd be happy to support other core Laravel unique* validators, but I'm not comfortable supporting a third-party one. If things change upstream on their end it means we'll have to change to stay compatible. If you want to use unique_with and this package, you'll probably be best to override that method in your app.

@Propaganistas

Copy link
Copy Markdown
Contributor Author

Ok I understand.

How about this? #154

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.

2 participants