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 validation is clearing auto-complete form values #142

Open
darnjo opened this issue Feb 15, 2012 · 0 comments
Open

rails validation is clearing auto-complete form values #142

darnjo opened this issue Feb 15, 2012 · 0 comments

Comments

@darnjo
Copy link

darnjo commented Feb 15, 2012

I can't really share any of the code I'm working on here (under NDA), however I am having a problem with the auto-complete module that I thought I'd report before trying to track down what's going on myself. Maybe others have had the same issue as well...if one of the developers of this module wanted to contact me directly I could, perhaps, be a bit more specific. Or at least construct an example that more closely mirrors our code. For now, I'll start with a verbal description of the problem.

I've confirmed that my models, routes file, controllers, and views are set up the way the usage guidelines say they should be.

In my model, I also have some active record validations that prevent certain fields from being blank. In one of the views, for example, there are three auto-complete fields (which are auto-completing correctly) one of which cannot be blank via the validate keyword in the model.

Assume that the record passed validations and was successfully added to the database initially, and that now I'm editing this record. If I clear the required field value and try to submit the form, the validations are triggered and the missing field is identified correctly, however triggering the validation clears the value from every auto-complete enabled field on the page.

Another thing that's not happening correctly is that labels for auto-complete fields that don't pass validation are not being highlighted red, whereas normal non auto-complete fields are.

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

No branches or pull requests

1 participant