I don't think you can keep them from inserting a file with a different extension, but once it is inserted, you can catch and reject those entries where the file extension is different.
Right ( ContainerField ; 4 ) = ".PDF"
Is a test you can use to confirm whether the file just inserted was of type PDF or not.
There's quite a bit of text accessible in container fields. You can see all the text (there can be multiple lines of text with store a reference files), if you use GetasText ( containerfield ) in the data viewer (Filemaker Advanced) or you can just put the container field's name in a calculation field's calculation with text specified as the return type.