How can I check if string contains characters & whitespace, not just whitespace?

Instead of checking the entire string to see if there’s only whitespace, just check to see if there’s at least one character of non whitespace:

if (/\S/.test(myString)) {
    // string is not empty and not just whitespace
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)