Attribute rules functions

Rules functions that work on attributes.