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

Validation for uniqueness not working #725

Closed
yunshang opened this issue Oct 30, 2017 · 1 comment
Closed

Validation for uniqueness not working #725

yunshang opened this issue Oct 30, 2017 · 1 comment
Labels

Comments

@yunshang
Copy link

yunshang commented Oct 30, 2017

model code

validates :name, uniqueness: true

html code

= simple_form_for [:admin, @team], validate: true, html: { class: type } do |f|
  div(hint-css)
     label name
        = f.text_field :name, class: "form-control",placeholder: 'name'

results screenshot

aa
image

Only the uniqueness validators not working, has been unable to find the problem.Sorry, English is very poor.

System configuration*

Rails version: 5.1.4

Ruby version: 2.4.0

Client Side Validations version: 10.0.1

@tagliala
Copy link
Contributor

tagliala commented Oct 30, 2017

Hi, uniqueness validator support was removed in version 7.0.

You should provide a custom implementation to make it work. Be aware of security issues (data disclosure), brute force attacks and synchronous ajax

Ref: #512 #597 #612 #636 #659 #226 #692 (comment)

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

No branches or pull requests

2 participants