Also strip spaces in validate_string.