﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26283	SplitArrayField failed to validate because remove_trailing_nulls doesn't work properly	Mohamad Nour Chawich	Daniel Quattrociocchi	"I have this form

{{{
class CategoryForm(forms.ModelForm):
    filters = SplitArrayField(SlugField(required=False), required=False, size=10, remove_trailing_nulls=True)
}}}

When I try to submit it without any values it fails with the error: ""Item 0 in the array did not validate:""
The reason is that on this line 181 in contrib.postgres.forms.array.py

{{{
            if null_index:
                cleaned_data = cleaned_data[:null_index]

}}}

Obviously in my case the null_index is 0, therefore the `cleaned_data` is returned as `[u'', u'', u'', u'', u'', u'', u'', u'', u'', u'']` which fails to look like an `empty_values` on line 1188 in db.models.base.py"	Bug	closed	contrib.postgres	1.8	Normal	fixed			Accepted	1	0	0	0	1	0
