Hi there,
today I discovered a strange thing. I am almost done with my project and doing last improvements…or at least i try to
Today, i wanted to implement some html-patterns for input validation within my django-filters
filter-definitions.Like so (for example):
employments__percent = django_filters.NumberFilter(
field_name='employments__percent',
lookup_expr='icontains',
widget=forms.TextInput(attrs={
'pattern': '^((100)|(\d{0,2}))$',
}))
If i do so and insert not-RegEx-matching text in the field on the rendered page, than - together with the RegEx warning, which is popping up under the input field, a bootstrap-modal shows up when i click the submit-button! The Modal is also part of the page, but has nothing to do with the input field i am coding on…and no, there are no identical HTML id’s and if i remove the pattern
part from the attrs
brackets, the mystery is gone…
Someone any ideas what’s going on here ?