I have followed this code (both html & js):
https://preview.keenthemes.com/html/metronic/docs/forms/formvalidation/advanced?_ga=2.176017122.1188950086.1690596666-950754628.1674302752#select2
Got this error (screenshot):
https://ibb.co/5BQD46S
Uncaught TypeError: element is null
addClass webpack://metronic/../demo1/src/plugins/@form-validation/cjs/core/index.js?:1099
addClass webpack://metronic/../demo1/src/plugins/@form-validation/cjs/core/index.js?:1098
classSet webpack://metronic/../demo1/src/plugins/@form-validation/cjs/core/index.js?:1131
classSet webpack://metronic/../demo1/src/plugins/@form-validation/cjs/core/index.js?:1131
install webpack://metronic/../demo1/src/plugins/@form-validation/cjs/plugin-framework/index.js?:69
install webpack://metronic/../demo1/src/plugins/@form-validation/cjs/plugin-bootstrap5/index.js?:59
registerPlugin webpack://metronic/../demo1/src/plugins/@form-validation/umd/bundle/popular.min.js?:11
formValidation webpack://metronic/../demo1/src/plugins/@form-validation/umd/bundle/popular.min.js?:11
formValidation webpack://metronic/../demo1/src/plugins/@form-validation/umd/bundle/popular.min.js?:11
formValidation webpack://metronic/../demo1/src/plugins/@form-validation/umd/bundle/popular.min.js?:20
<anonymous> http://localhost:9000/assets/js/store/add/general.js:98
Hi Sean, thanks for your help. The issue i misplaced fv-row
. Its fixed now.
Hi ,
Great! If you need any further help please do let us know.
All the best with your project!
Regards.
Hi, can you please send your code for select, mine only displays the form validation message but not the icon
<div class="input-group mb-5 fv-row">
<span class="input-group-text" >
<i class="ki-duotone ki-shield fs-2x"><span class="path1"></span><span class="path2"></span><span class="path3"></span></i>
</span>
<div class="form-floating ">
<select class="form-select form-select-solid" name="cbTest[]" data-control="select2" data-placeholder="Select test" data-allow-clear="true" multiple="multiple" required>
<option></option>
<option value="A">A</option>
<option value="B"><B></B></option>
<option value="C">C</option>
<option value="D">D</option>
<option value="E">E</option>
</select>
<label for="cbTest[]">User Role</label>
</div>
</div>
Hi,
May I know your Metronic version and demo? Could you please provide your HTML and JS code via https://gist.github.com/ ? We will need to debug your code in order to investigate your issue. Also please make sure you added fw-row
class to the input group container in order to display the validation error messages as explained in the docs.
Regards.