If "invalid" means that there is a space present in the field, use this criteria to find all such records:
And you can probably use Replace Field Contents with the Trim function in a calculation to remove leading and trailing spaces from this field.
Got rid of spaces and double spaces but still the script failed.
It turns out that lots of the email addresses had carriage returns after them.
I did a search for returns and deleted them all.
" <press return key> "
All good now.
You may want to set up an auto-enter calculation on this field that filters out such characters so that user are prevented from entering such errors in the future.
And field behavior can be set for this field so that pressing return moves the cursor to the next field just like pressing tab and this can keep out the returns when users manually enter email addresses.
In time you will get tired of manually correcting your database and begin to learn how to make corrections using replace, find, etc.
Substitute is a wonderful tool.
Substitute(field;"PP";"") would work for above but not in all cases.
Trim() removes blank spaces at end.
Using a table you can select a field and do a find and replace using Command+F and step through each record to validate your replace. Try this on a copy of your db to gain experience.