[Django]-Django- how to check validity of single input field inside multi input form

3👍

The proper way would probably be to add it to it’s own form 😉

But… you can do it like this:

form = SomeForm(request.POST)
field = form.fields['your_field']
data = field.widget.value_from_datadict(form.data, form.files, form.add_prefix('your_field'))
cleaned_data = field.clean(data)
👤Wolph

Leave a comment