How to set acceptable file types in a Django form's FileInput widget
===

Is there a way to set the accepted file types in a django `forms.FileInput()` widget? I want it to accept only .txt and .pdf. 

The [docs][1], contain nothing. If this is not at all possible, how can we add the validation at client side for a django form?


  [1]: https://docs.djangoproject.com/en/dev/ref/forms/widgets/#fileinput