Add validators to attributes.