Skip to content
New issue

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

field errors are not shown #147

Closed
AlekseiKhatkevich opened this issue May 23, 2019 · 6 comments
Closed

field errors are not shown #147

AlekseiKhatkevich opened this issue May 23, 2019 · 6 comments
Assignees

Comments

@AlekseiKhatkevich
Copy link

AlekseiKhatkevich commented May 23, 2019

Hello
if render fields separatelly from the main form, field errors under the fields after false valdation arent shown. If render form as a whole - everything is fine.

html:

                    <div class = "offset-1 col-4" >
                        {% bootstrap_field form1.last_year layout='inline' size="small" form_group_class="" label_class="form-label col-md-3"  %}
                        <small class="form-text text-muted">{{ form1.last_year.help_text }}</small>
                    </div>

Should i use special div classes to swith it on maybe?
Fields are marked in green and red according True/false validation -thats fine, but no error texts are shown under the field. Main errors panel above the whole form displays them

Thank you

@penkin
Copy link

penkin commented Jun 12, 2019

@AlekseiKhatkevich did you ever come right with this? I'm having the same issue.

@will-emmerson
Copy link

Seems to be this issue:
twbs/bootstrap#23454

A working but not exactly brilliant solution is to add this css:

.invalid-feedback {
    display: block;
}

@penkin
Copy link

penkin commented Jun 12, 2019

@will-emmerson also seems like you can add novalidate to the form. According to the bootstrap docs that will then not use the browser's validation messaging and show the feedback messages.

<form action="." method="post" class="form" novalidate>
    ...
</form>

//cc @AlekseiKhatkevich

@AlekseiKhatkevich
Copy link
Author

@will-emmerson also seems like you can add novalidate to the form. According to the bootstrap docs that will then not use the browser's validation messaging and show the feedback messages.

<form action="." method="post" class="form" novalidate>
    ...
</form>

//cc @AlekseiKhatkevich

Tried this solution. Doesnt work

@penkin
Copy link

penkin commented Jun 13, 2019

That is strange @AlekseiKhatkevich, working in my project.

@rstorey
Copy link

rstorey commented Oct 29, 2019

twbs/bootstrap#29439

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants