-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Broken Client Side Validation for filtering select #2398
Comments
look her #2339 |
Maybe related to my issue #2492 |
@SuperMasterBlasterLaser it is, so your issue is a duplicated one. I suggest to close - a high issue count isn't precisely motivating! |
I'm have same problem. I'm have required field on model and use Enumeration for generate select-box with values. Generated be hidden and have attribute 'required'. It's see like logic error. I think disable HTML validation it's not best solution, because then we will have more requests to server(HTML validation prevent many requests with invalid data). Plus, config.browser_validations = false will disable HTML validation for all input elements of rails_admin application. P.S. I think 'required' attribute should be add to visible input element. |
Reproduced for
Flash notifications do not appear either. Probably because of the JS breakdown. UPDATE: I was able to resolve with RailsAdmin.config do |config|
config.browser_validations = false
end Nevertheless, I think it's a bug. JS should be safeguarded and not throw up. |
Hi, anyone found a way to fix this issue? |
No =) |
#2905 check this fix |
…_for_filtering_select Fix #2398: Broken Client Side Validation for filtering select
Hi,
when a required attribute is left empty, upon form submission, a tool-tip is shown on the field.
When the required attribute is a relation, the client-side navigation does not work.
In Chrome there is no visible reaction, but in the console the following error pops up:
An invalid form control with name='property[feature_id]' is not focusable.
In Firefox, the tooltip shows up in a completely wrong location (see picture below).
I'm pretty sure the the cause is that for filtering-select, the invisible select tag has the attribute
required="required"
and this freaks out Chrome and breaks the positioning of the tooltip on Firefox.
I believe that for associations, the required attribute needs to be moved to the visible controls.
I'd gladly contribute a pull-requrest myself, but I don't understand very much the form-rendering logic in rails-admin.
The text was updated successfully, but these errors were encountered: