vue-form-generator icon indicating copy to clipboard operation
vue-form-generator copied to clipboard

Fields needs at least one validator as part of the schema before the "required" is checked

Open carnun opened this issue 4 years ago • 0 comments

Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.

  • I'm submitting a ...
    • [x] bug report
    • [ ] feature request
    • [ ] support request => Please do not submit support request here, see note at the top of this template.
  • Do you want to request a feature or report a bug?

Bug report

  • What is the current behavior?

When I make radio buttons required in the form schema and validate the field then the validation succeeds even if none of the radio options have been selected. On the other hand if I add any validator then the required check is triggered.

Take a look at https://jsfiddle.net/r2ysqn64/2/ 1 Click on the "Validate" button 2 The first radio does not show a required error 3. The second radio (which has a required validation) shows a required error message 4. The third radio (which has a string validation) shows a required error message

  • What is the expected behavior?

I would expect the required to not to need an additional validator.

  • Please tell us about your environment:

    • Version: [email protected]
    • Browser: Checked on Vivaldi, Chrome and Firefox
    • Language: all

carnun avatar Jun 19 '20 14:06 carnun