The FASTA format
A FASTA file contains one or more records. Each record starts with a header line beginning with ">", followed by an identifier (the text up to the first space) and an optional description, then one or more lines of sequence.
Common problems this catches
Missing or empty headers, duplicate identifiers (which break indexing and many aligners), records without sequence, characters that are not valid for DNA, RNA or protein, a space straight after ">", and inconsistent line widths, which samtools faidx and some genome tools reject.
Formatting
After validation you can rewrap every record to a fixed line width, 60 or 80 characters being the most common, and copy or download the cleaned file.