Add validation rules support for both classes.