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

Rails 6.0.0.beta2: breaking change in case sensitive uniqueness validator #753

Closed
tagliala opened this issue Feb 28, 2019 · 2 comments
Closed
Assignees

Comments

@tagliala
Copy link
Contributor

Steps to reproduce*

rake

Expected behavior*

Test pass

Actual behavior*

Failure:
ActiveRecord::UniquenessValidatorTest#test_uniqueness_client_side_hash_with_existing_record [~/dev/client_side_validations/test/active_record/cases/test_uniqueness_validator.rb:31]:
--- expected
+++ actual
@@ -1 +1 @@
-{:message=>"has already been taken", :case_sensitive=>true, :id=>1}
+{:message=>"has already been taken", :case_sensitive=>nil, :id=>1}

System configuration*

Rails version:
6.0.0.beta2

Ruby version:
2.6.1

Client Side Validations version:
master

Code snippet from your model of the validations*

N/A

The whole form code from your template*

N/A

The resulting HTML*

N/A

Browser's development console output*

Please confirm that your browser's development console does not contain errors.
N/A

Additional JavaScript Libraries*

If your issue depends on other JavaScript libraries, please list them here. E.g: Bootstrap Modal v3.3.7, jQuery UI Datepicker 1.12.4.
N/A

Repository demostrating the issue

N/A


* Failure to include this requirement will result in the issue being closed.

@tagliala tagliala self-assigned this Feb 28, 2019
@tagliala
Copy link
Contributor Author

Ref: rails/rails@6cb176c

@tagliala
Copy link
Contributor Author

⚠️ Potential Breaking Change!

The client-side uniqueness validation was ignoring the case_sensitive: true parameter.

Scenario

Previous behavior

  • Show a validation error

New behavior

  • Do not show a validation error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant