added validateName()

This can be used directly to validate names.