Validate attributes.