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

Only first radio button set validated #198

Open
parker411 opened this issue Mar 7, 2017 · 2 comments
Open

Only first radio button set validated #198

parker411 opened this issue Mar 7, 2017 · 2 comments

Comments

@parker411
Copy link

Issue:
Only the first of the two items is validated. If I flip the crane and scaffold config around, it still uses which ever one comes first.

Using Chrome 56.0.2924.87 (64-bit) and IE11

code:

...
    rules: 'required|numeric'
}, {
    name: 'scaffold',
	display: 'Scaffolding Erected',
    rules: 'required'
}, {
    name: 'crane',
	display: 'Crane in Use',
    rules: 'required'
}, {
...

and

				<div class="formContainer">
					<label>Is Scaffolding being erected within 4 Mtrs?</label>
					<div class="radioContainer">
						<label for="scaffold1">Yes</label>
						<input type="radio" name="scaffold" id="scaffold1" value="y">
						<label for="crane2">No</label>
						<input type="radio" name="scaffold" id="scaffold2" value="n">
					</div>
				</div>
				<div class="formContainer">
					<label>Are Cranes or Mobile plant being used?</label>
					<div class="radioContainer">
						<label for="crane1">Yes</label>
						<input type="radio" name="crane" id="crane1" value="y">
						<label for="crane2">No</label>
						<input type="radio" name="crane" id="crane2" value="n">
					</div>
				</div>
@fraenzchen
Copy link

I've the same problem. When using 2 sets of radios, only the first ist validated.
See: https://jsbin.com/demicotapu/1/edit?html,js,console,output
Only if the first radio button is valid the error message of the second is shown.
Any help appreciated!

Thx in advance

@fraenzchen
Copy link

I read a view more and found pull request #183 from beijaflor who solved this problem.
Thx @beijaflor!
@rickharrison Is there a reason I don't see, why you don't pull beijaflor's fix? Beside that: Thx for your work, great stuff!

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

2 participants