Fix metric attribute value validation and add a non-regression scenario