checkbox required validation wrong when style applied

The ejs-checkbox checkbox component validates wrong because it seems that the input field is not checked- or not yet set when the formvalidator validates the field or when the field validates itself

when the css

@import "../node_modules/@syncfusion/ej2-base/styles/material.css";
@import "../node_modules/@syncfusion/ej2-vue-buttons/styles/material.css";


is applied - the input is not checked and this line in form-validator.js does not validate correctly

return selectAll('input[name="' + name + '"]:checked', this.element).length > 0;

please have a look at the example i provided

 


Attachment: checkboxvalidate_b4138e4f.zip

6 Replies

GK Gayathri KarunaiAnandam Syncfusion Team March 11, 2022 05:13 PM UTC

Hi Michael, 
 
We can resolve the reported issue by using the CSS style. Please check the below code snippet. 
 
Code: 
 
<style> 
.e-checkbox-wrapper .e-error{ 
  margin-bottom: 15px !important; 
</style> 
 
Please check and get back to us, if you need further assistance. 
 
Regard, 
Gayathri K 



MK Michael Koelbl March 21, 2022 01:55 PM UTC

Hi Gayathri,

your fix is just repositioning the error message.

The problem is that the validation state is not correct.

the checkbox validates to false although its visual state is checked.
the state in the screenshot does not make sense.
check the form-validator.js line i provided in the first posting

please fix that.



GK Gayathri KarunaiAnandam Syncfusion Team March 22, 2022 01:04 PM UTC

Hi Michael, 

We are able to replicate the reported issue at our end. We need to validate more on this. So, we will update further details on March 24th,2022. 

Regards, 
Gayathri K 



GK Gayathri KarunaiAnandam Syncfusion Team March 31, 2022 02:45 AM UTC

Hi Michael,


We have confirmed this as an issue from our side. We have logged a bug report for this. You can track its status from the below feedback link.


Feedback https://www.syncfusion.com/feedback/33670/checkbox-validation-state-is-wrongly-passed-to-validator


The fix will be provided in our upcoming patch release which is scheduled for April 13th, 2022.


Kindly get back to us if you need any further assistance.


Regards,

Gayathri



YA YuvanShankar Arunagiri Syncfusion Team April 18, 2022 08:21 AM UTC

Hi Michael,

We have resolved your issue, but unable to move the fix in previous patch release. So we have planned to include this fix in our 20th April 2022 patch release.

Regards,

YuvanShankar A



YA YuvanShankar Arunagiri Syncfusion Team April 21, 2022 08:42 AM UTC

Hi Michael,


Thanks for the patience.


We are glad to announce that our weekly patch release (20.1.50) is rolled out. We have included the fix for this issue in this release. So, we suggest you upgrade our Syncfusion packages to our latest version to resolve this issue in your end. (20.1.50).


Feedback: https://www.syncfusion.com/feedback/33670/checkbox-validation-state-is-wrongly-passed-to-validator


Please let us know, if you need further assistance.


Regards,

YuvanShankar A


Loader.
Up arrow icon