only word file can be uploaded

hello team,

I have an file upload component and i need to add one validation where user can only upload word file and if he uploads anything else we need to display error.

Thanks in advance 

 Discussion posts and replies are publicly visible