Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix false positive in UniquenessValidator with conditions #882

Merged
merged 2 commits into from
Dec 8, 2022

Commits on Dec 7, 2022

  1. Support conditions specific to the validator

    validates can take a hash of options specific to one validator
    etiennebarrie committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    c7e7de3 View commit details
    Browse the repository at this point in the history
  2. Support conditions option of UniquenessValidator

    Since the `:conditions` option is a callable, we can't know exactly
    which columns are necessary for the index, and the index is not required
    to be unique anymore (maybe the conditions make the uniqueness only
    apply to some records), it's not possible to add an offense when the
    option is used.
    etiennebarrie committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    61d3f6c View commit details
    Browse the repository at this point in the history