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

aspnet validation does not validate radio inputs #487

Closed
james-whittington1 opened this issue Feb 17, 2021 · 2 comments
Closed

aspnet validation does not validate radio inputs #487

james-whittington1 opened this issue Feb 17, 2021 · 2 comments

Comments

@james-whittington1
Copy link

james-whittington1 commented Feb 17, 2021

the function that validates required fields has a specific check for checkboxes but neglects to check radio boxes.
image
The issue appears to be in \App_Plugins\UmbracoForms\Assets\themes\default\umbracoforms.js at line 81
In my screenshot i have added an or check to fix the problem.

Steps to reproduce

Note: you must be running the aspnet-validation javascript - jquery validate is not effected.
I used the @Html.RenderUmbracoFormDependencies() method to render the dependencies and it automatically loaded aspnet-validation, I don't know how this method determines what to load.

Create a new form with a radio list input field and make it mandatory.
Submit the form.

Expected result

The front end validation tells the user that the field is required.

Actual result

The form submits and the back end validation runs, the form is then rendered with the backend validation showing

@nul800sebastiaan
Copy link
Member

Thanks for the report @james-whittington1 - we'll have to have a look at this! Good that you found a workaround for now, we'll probably add that to the code as well, thanks! 👍

@nul800sebastiaan nul800sebastiaan added project/validation state/sprint-idea This issue doesn't fit in the next few sprints but we're reviewing it regularly for a later sprint type/bug labels Feb 23, 2021
@warrenbuckley
Copy link

warrenbuckley commented Mar 2, 2021

Fixed in this PR https://github.com/umbraco/Forms/pull/445 and is due for 8.6.2 8.7.0 release

@umbrabot umbrabot removed the state/sprint-idea This issue doesn't fit in the next few sprints but we're reviewing it regularly for a later sprint label Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants