<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_file(file_type, file_path):
 """ Validates a file against a schema Parameters file_type : str Type of file to read. May be 'component', 'element', 'table', or 'references' file_path: Full path to the file to be validated Raises ------ RuntimeError If the file_type is not valid (and/or a schema doesn't exist) ValidationError If the given file does not pass validation FileNotFoundError If the file given by file_path doesn't exist """


    file_data = fileio._read_plain_json(file_path, False)
    validate_data(file_type, file_data)