#47, make isValid detect more invalid characters