We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Update this method to fix it.
def get_checkbox_classes(self): """Return CSS classes for checkbox.""" classes = ["form-check"] if self.checkbox_style == "switch": classes.append("form-switch") if self.checkbox_layout == "inline": classes.append("form-check-inline") if self.field_errors: classes.append(self.error_css_class) elif self.field.form.is_bound: classes.append(self.success_css_class) return merge_css_classes(*classes)
if it was me, I would add a method like this to make getting valid/invalid easier:
def get_valid(self): if self.field_errors: return self.error_css_class elif self.field.form.is_bound: return self.success_css_class return None # or return '' for concatenation
The text was updated successfully, but these errors were encountered:
That's not all there is to it, the error message also has to go inside the form--check class.
form--check
See https://getbootstrap.com/docs/5.0/forms/validation/#server-side
<div class="form-check"> <input class="form-check-input is-invalid" type="checkbox" value="" id="invalidCheck3" aria-describedby="invalidCheck3Feedback" required> <label class="form-check-label" for="invalidCheck3">Agree to terms and conditions</label> <div id="invalidCheck3Feedback" class="invalid-feedback">You must agree before submitting.</div> </div>
Sorry, something went wrong.
Recent change fixed issue, Good Job!
Successfully merging a pull request may close this issue.
Update this method to fix it.
if it was me, I would add a method like this to make getting valid/invalid easier:
The text was updated successfully, but these errors were encountered: