Added element in addition to id

This change allows for more complex validation that takes into account
the element, for example using Custom Data Attributes (data-*). Also it
allows for error presentation even when the element has no id.