Update X2FormElement.php

Fixed bug in mimetype and file extension  validation related to file uploads