Warning might be more concise, and just as informative, by saying 'Names can not contain spaces'.