Adding generic attribute constraint