fields_check function

Check whether the user-specified fields are valid