Skip to content

Commit

Permalink
Add errors to all validatable elements not just inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
LiteracyFanatic committed Jul 28, 2023
1 parent b62f519 commit ff53d94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ export class ValidationService {
if (input.form) {

// Adding an error to one input should also add it to others with the same name (i.e. for radio button and checkbox lists).
const inputs = input.form.querySelectorAll(`input[name="${input.name}"]`);
const inputs = input.form.querySelectorAll(validatableSelector(`[name="${input.name}"]`));
for (let i = 0; i < inputs.length; i++) {
this.swapClasses(inputs[i],
this.ValidationInputCssClassName,
Expand Down

0 comments on commit ff53d94

Please sign in to comment.