I created your formula in the “Manage Names” window and named it VALIDATE, then wrapped it in the “Validity” window with the INDIRECT function… Alas, not working.
INDIRECT(VALIDATE)
Searching with REGEX(<…>;"\n") also failed.
In short, your formula doesn’t work in Excel either.
And this one doesn’t work either (accepts everything except NewLine):
=ISNUMBER(FIND(CHAR(10);A2))
I believe it is slightly better than the one you suggested
:
=NOT(ISERROR(SEARCH(CHAR(10);A2)))