better comments describing validateAttributes