DavyJonesLocker / DavyJonesLocker/client_side_validations-simple_form

inputs with :as => :radio_buttons are being skipped in validation

Open
#20 21 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
JavaScript
Stars
252
Forks
98
Avg merge
4h 56m
Merged PRs (30d)
3

Description

In a form I'm building using ClientSideValidations + SimpleForm (with the gem plugin) the client side validation works for all fields except the :radio_buttons. The HTML that is produced for this group is similar to the other working ones:

`


...

`

Yet when the submit button is clicked, all the other inputs get the 'error' class but the radio_buttons input does not. If I remove the :as => :radio_buttons, the client side validations works just fine.

Any idea what is causing this? Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the form with ClientSideValidations, the Simple Form plugin, and :as => :radio_buttons, then inspect the generated radio-group markup and client-side validation handling. Done means a required radio group receives the same error class and validation feedback as the other inputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, rails
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.