AttributeValidationResult validate(AttributesUpdate update) {
for (int i = 0; i < update.changeSize(); ++i) {
String name = update.getChangeKey(i);
ValueValidator validator = valueValidators.get(name);
if (validator == null) {
return new AttributeNotAllowed(name);
}
String value = update.getNewValue(i);
if (value == null) {
if (requiredAttributes.contains(name)) {
return new RemovingRequiredAttribute(name);