Fixing validation logic for name fields