validation input file

validation input file

hi excuse is there  a way to get the properties of a input file such as(error,name,size) i mean the properties of a file when is selected or is there a plugin which help to validate input file where i can specify the maximum size and the type of file (.doc,.jpg,) for instance, thank you