Is it possible to validate the file type?

In order to validate images, you have to add “images only” option into your widget configuration. For other types of files, you have to configure validator and restrict files types by file extension.

See this live demo that shows how to set it up.