Skip to content

Customizing validation on specific fields or form #738

Description

@TohidN

I tried to disable validation of a form or it's specific fields. but it seems that django-bootstrap5 forces validation for all bound forms:

def get_server_side_validation_classes(self):

  • I tried to remove 'is-valid' from my form object, but the validation css class is added before rendering.
  • I can use server_side_validation in django-bootstrap5 settings but it's global and I don't want to stop validating other forms.

I suggest adding a new parameter to template tags responsible for rendering forms and fields. E.g. {% bootstrap_form form server_side_validation=False %}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions